How can I convert a matlab code to C?

3 次查看(过去 30 天)
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 个评论
Shashank Prasanna
Shashank Prasanna 2013-1-30
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.

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2013-1-30
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 个评论
Ijeoma Madu
Ijeoma Madu 2013-1-31
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

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Coder 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by