Is it possible to compile C# code in Matlab?
Ältere Kommentare anzeigen
I'm currently working on the tool which consist of 2 parts. One is written outside in C#. Another will be developed in Matlab. The tool should run under Linux Red Hat 5.6 OS. It seems logical then to compile both parts using Matlab. But I can't find any infromation in help about compiling C# code. Still, I see articles about compiling C and C++ code.
Could anyone comment on the possiblity to compile C# code as well? I have currently 2010b version of Matlab.
Tnanks
2 Kommentare
Friedrich
am 27 Mär. 2012
C# and Linux? I would guess some C# clone, right?
The MEX concept works for C/C++ and Fortran only.
MATLAB cannot compile C# code. However you can use System commands from MATLAB to call the C# compiler.
If you want to use .NET DLL's in MATLAB one uses NET.addAssembly. But not sure if this command runs/is shipped on Linux.
Alexander
am 27 Mär. 2012
Akzeptierte Antwort
Weitere Antworten (1)
Bill Chou
am 23 Mär. 2020
0 Stimmen
Another possible approach is to have the final program running in C# outside of MATLAB. In this case, you could use MATLAB Coder to convert your MATLAB algorithms into C/C++, do some manual work to interface it with C#, and then integrate that into your C# application. Please see this article for more details:
Kategorien
Mehr zu Troubleshooting in MATLAB Compiler SDK finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!