Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rewritting MATLAB code to C code 1

Status
Not open for further replies.

echaiquin

Electrical
Mar 23, 2010
5
Hello people,
Just a simple question, how difficult is it to translate MATLAB code to C code?
Thank you very much for your help,
Eduardo
 
Replies continue below

Recommended for you

Isn't there a Matlab compiler that already does this?

TTFN

FAQ731-376
 
Do not believe there is such a compiler, but Simulink might have some capabilities which I do not know. If anyone could clarify it would be greatful!
Thank you,
Eduardo
 
Thank you very much IRstuff. I will have a look at it! The point is that I am absolutely new to MATLAB, and really didn't know where to start from.
Eduardo
 
The Matlab "compiler" is a myth. In the olden days, rubbish loopy Matlab code could be made to run faster by converting it into a MEX file and compiling it: the original Matlab "compiler". This product has since morphed into a mere deployment tool. It allows Matlab routines to run sans licence, so long as you don't mind the hefty baggage that's required. m-files run more slowly after being "compiled" now.

For quick Matlab-ish code, write some C++ Matrix classes and pass off data to lapack/blas.

- Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor