C code generation from Matlab (m-file)

Can i generate c code from matlab m-files I believe that c code can be generated from simulink models using rea time workshop but can the same be done using m-files instead of simulink.

Reply to
arslan
Loading thread data ...

Look at MCS from AgilityDS

formatting link

Hans

formatting link

Reply to
HT-Lab

Yes, if you have the matlab Compiler product. Otherwise you have to code by hand.

There are third party converter products, but they aren't cheap.

formatting link

Reply to
Freelance Embedded Systems Engineer

Yes, I do it all the time, you have to first drag an embedded matlab block into simulink, then put your m code inside it, there are some limitations as far as what functions you can and cannot use in the m file, but not too bad, then hit the generate code button, out comes commented C code (well it just take the comments from your m file).

Reply to
stevepierson

The Embedded MATLAB Coder product from MathWorks allows you to generate C from matlab m files without using simulink

Reply to
jayaraman.arvind

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.