S.O.S. - MATLAB code convert to the C#.

9 views (last 30 days)
Morris
Morris on 19 Nov 2011
Hi All!
I need a bit of help :). How can I convert the .m file code to the C#.
Please, if someone knows about how can I do that I would be very thank you.
Thank you in advance!

Answers (1)

Walter Roberson
Walter Roberson on 19 Nov 2011
To do that automatically, you would need MATLAB Coder (the current product name), which is an optional and noticeably expensive toolbox. MATLAB Coder would produce C code which you could then use from within C#. (I do not know exactly how that would be done in C#; in C++ it would involve telling the compiler that the code was within the "C" namespace.)
There are a lot of different routines that cannot be compiled with MATLAB Coder.
There is a different approach if you do not need to convert the code to C# and simply need to invoke the code from C#: in that case, you can use MATLAB Builder NE which will produce .NET or COM compatible objects. There are limitations on what Builder NE can convert as well, but fewer limitations than for MATLAB Coder.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!