I am just curious. What is the cheapest and most contemporary option to integrate matlab and .net. I believe there are other options than this:
Asked
Active
Viewed 1,612 times
3
-
do you want to use MATLAB from .NET, or do you want to use .NET from inside MATLAB? – Amro Jun 19 '12 at 16:23
1 Answers
5
If you are calling .NET from MATLAB, you can import .NET assemblies directly into MATLAB (either at the command line or within a program) using the command NET.addAssembly
. See the documentation for details.
If you want to call a live, installed copy of MATLAB from .NET, you can instantiate MATLAB via its COM interface and execute code. See the documentation for details.
If you want to compile MATLAB code to a standalone .NET assembly that can be called from .NET without requiring a live installed copy of MATLAB, you would need MATLAB Builder for .NET.

Sam Roberts
- 23,951
- 1
- 40
- 64
-
Thanks. does the second option (call installed copy of matlab) require a specific toolbox? – cs0815 Jun 19 '12 at 19:19
-
You can call live MATLAB via its COM interface from .NET with just base MATLAB. Obviously, if you want to execute functions from toolboxes, you would need those toolboxes. – Sam Roberts Jun 19 '12 at 20:47
-
Is it also possible to compile to C++ and then call into the C++ dlls from .net? I had huge issues with the .net implementation.. the latest being that .net 4.5 is not supported. I suppose I could go around that by compiling to C++ and then calling C++ dlls? – Andreas Reiff Jul 03 '13 at 20:16