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.
- posted
14 years ago
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.
Look at MCS from AgilityDS
Hans
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.
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).
The Embedded MATLAB Coder product from MathWorks allows you to generate C from matlab m files without using simulink
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.