MATLAB algorithmic statements to C
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
MATLAB algorithmic statements to C

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> DSP
Author Message
Hyoung Lee
Guest





Posted: Wed Dec 22, 2004 3:01 pm    Post subject: MATLAB algorithmic statements to C Reply with quote

[Please excuse this topic if this it has been covered (I attempted to search
past messages without success)].

Is there a translator that translates MATLAB algorithmic statements into C
statements?

I have been using R14 MATLAB and MCC to translate M-Files into DLLs in the
Windows environment. But, for TI DSPs, I had to manually translate MATLAB
statements into C statements. When I used MCC to generate C files, they
contain library calls to emulate the MATLAB execution environment. Though
"Link for TI CCS" and "Realtime Workshop" help testing and validating DSP
algorithms in the TI CCS environment, such C files embed MATLAB library
calls, which are equivalent to MEX structures.

I need to automatically translate many DSP algorithms written in MATLAB
(algorithmic statements only) to C (as opposed to manually translating or
rewriting an equivalent algorithm in C); for example:

MATLAB statements:

if (intensity < max),
intensity = intensity + increment;
else
direction = down;
intensity = intensity - increment;
end;

to C statements:

if (*intensity < max)
(*intensity) += increment;
else {
*direction = down;
(*intensity) -= increment;
}

Is there a translator with which one can automate the process? Are there
other solutions that will help translate MATLAB algorithmic statements to C
statements?

Thanks,

Hyoung
Back to top
Harryk
Guest





Posted: Sat Dec 25, 2004 2:13 am    Post subject: Re: MATLAB algorithmic statements to C Reply with quote

Yes,from 6.5 matlab support this convertion. However, matlab can not
convert m file to C, but can convert simulink-model into various C
platform including Embedded C Code
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> DSP All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB