How to convert Matlab code to C language

Asked By 0 points N/A Posted on -
qa-featured

Hi,

I am using Matlab 7.9.0 (R2009b) on Window 7.

I have a simple program written in Matlab which i want to convert in C, can any one tell me that how to convert the MatLab code to C language?

Thanks in Advance.

SHARE
Best Answer by SriNike
Best Answer
Best Answer
Answered By 0 points N/A #116936

How to convert Matlab code to C language

qa-featured

Hello Jack,

For the latest versions of MATLAB, there is a product called MATLAB Coder that will convert your MATLAB code to C and C++ standalone programs (which are both Readable and Portable). For the older versions, there are products like MATLAB Compiler which are later removed because of some flaws.

There are very few software’s available to convert MATLAB to C language like Embedded MATLAB / Real Time Workshop / Simulink /  Fixed Point Toolbox and Catalytic MCS.  Best one of them is Catalytic MCS. This is user friendly and can convert efficiently. But not as efficient as MATLAB Coder.

So finally, I suggest you to upgrade your MATLAB version to convert your files without any issues. If you don’t want to do it, then just go for Catalytic MCS which is the next best option. Because other processes involve a little code changes and some confusing steps to convert.

Hope this helps you…

Thanks,

SriNIke.

Answered By 0 points N/A #116937

How to convert Matlab code to C language

qa-featured

I have been researching this and spoke to Mathworks support recently.

This is what I learnt about Embedded Matlab:

  • Will need to buy Real Time Workshop and Simulink ($ 7500+3000)
  • Embedded Matlab (emlc) is limited

a. Not all functions can be translated
b. M code to be written to be compliant with emlc guidelines
c. Will not be as fast as normal C
d. <my thought> Unknown issues that may arise from machine generated
code

Related Questions