How can I convert a matlab code to C?

I want to convert this to C code
function [c]= add(a,b)
c=a+b
How is the compiler used to convert this to C, i am new to this. I do not have a Matlab coder.

1 Kommentar

Shashank Prasanna
Shashank Prasanna am 30 Jan. 2013
If you don't have MATLAB Coder, you will have to write it yourself. There is no other way to automatically generate C code out of MATLAB code.

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 30 Jan. 2013

0 Stimmen

MATLAB Coder is the only product for converting MATLAB to C.
MATLAB Compiler (a different product) does not convert to C: it converts to internal data structures that are interpreted by a MATLAB engine.

1 Kommentar

Ijeoma Madu
Ijeoma Madu am 31 Jan. 2013
Thanks. I guess i would get a coder. But how is the compiler used, i would like to see its benefits. I have never used it before

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB Coder finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by