Launch MCR in a C# code
18 次查看(过去 30 天)
显示 更早的评论
Hello,
I would like to execute Matlab functions in a C# code (VS2010, W7). My C# code is as follows:
// Declaration
DllImport(@"C:\Program Files\MATLAB\MATLAB Compiler Runtime\v715 bin\win32\libeng.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr engOpen(string startcmd);
// Call MCR
IntPtr engine = engOpen(null);
Matlab is launched but however crashs immediately without any log or information...
Any idea?
Thanks for your help!
0 个评论
采纳的回答
Friedrich
2012-5-7
Hi again,
Since you have an installed MATLAB and working with C#, why arent you using COM directly? This makes it a way easier:
And make sure MATLAB is registered as COM server. In order to register it run
regmatlabserver
in MATLAB.
0 个评论
更多回答(2 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Compiler SDK 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!