Is it possible to compile C# code in Matlab?
조회 수: 7(최근 30일)
표시 이전 댓글
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.
댓글 수: 2
Friedrich 2012년 3월 27일
yes C# is Windows only. So it won't run on Linux. But there are some Linux clones available:
But I am not sure if this works nicely and if this works together with MATLAB. This would also require that the end user installs these files.
If possible, I would recommend rewriting the C# part in JAVA so that it can run on Linux and Windows (and also MAC).
Bill Chou 2020년 3월 23일
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:
Find more on Get Started with MATLAB Compiler SDK in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!