Matlab和C#之间的互操作操作、Matlab

2023-09-02 11:47:18 作者:日落大道

在互联网附近偷看后,它看起来是可能的C#与Matlab之间互操作。我想知道如果任何人有过成功,也和他们做了什么这样做。如果可能的话不知怎么拉它关闭不使用的COM。感谢您的时间。

After peeking around the internet it looks like it is possible to interop between C# and Matlab. I am wondering if anyone has had success with it and what they did to do so. If possible somehow pulling it off without the use of COM. Thanks for your time.

推荐答案

是的,很可能的。虽然我结束了使用C接口和调用到,使用混合模式DLL(和获得C#调用成......但那是因为我也有一些其他的C code接口)。这是非常简单的。在要运行程序的计算机,您需要安装Matlab的运行MCRInstaller.exe。

Yes, quite possible. Though I ended up using the C interface and calling into that using a mixed-mode DLL (and getting C# to call into that... but that was because I was also interfacing with some other C code). It's quite straightforward. On computers where you want to run your program, you'll need to install Matlab Runtime MCRInstaller.exe.

编辑:删除断开的链接