sarathhari
Junior Member level 3
Is there any method for converting Matlab .m file into C code so that we can compile that into any DS microcontrollers like DSPIC. Please Help if anyone knows
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
As I know there is website called as code convert but that convert VB code in to C# but I think it is not that straight forward in case of matlab to C conversion....as Matlab written code many times uses in-built matlab function like plot() or fft etc. those libraries as I know are developed in Java which is object oriented language where are conversion to structured language like C will be very complicated assignment to write..... In my view what you should do isolate the logic and use minimum matlab in-built function .... and then better to write the code in C itself.....now the second point that you have is you want to use this code to embedded platform like DSPIC which comes with different way of chip specific coding..... so I think even you convert the C code from Matlab file will not be directly used on embedded platform....
Good Luck
ok..... Very Good question.... However I never worked on this aspect but what I know Matlab itself comes with embedded processor specific toolbox or simulink kind of software..... my hunk here is they might be using one of that that.......
Refer this -
https://www.mathworks.in/products/embedded-coder/
https://ww1.microchip.com/downloads/en/DeviceDoc/MATLAB_Device_Blocks_51771b.pdf
good luck