Thread Subject: Conversion to C/Fortran

Subject: Conversion to C/Fortran

From: Juliette Salexa

Date: 16 Jul, 2009 20:07:01

Message: 1 of 2

Several places say that one can convert an .m file into C using the real-time workshop toolbox.

I haven't figured out how to do this without using simulink (I don't know how to use simulink and I'm not sure what the learning curve is like). Is there a way to do it without simulink ??

If not, what can I actually DO with simulink in terms of converting .m files to C ...
I'd be surprised if it could write a C code that does exactly what my m-file does ... since many of my subroutines involve functions that don't have analogous commands in C.

Even better, is there a software that will convert my m-file (or part of it) into a fortran code ??

Subject: Conversion to C/Fortran

From: Michael Hosea

Date: 16 Jul, 2009 20:26:37

Message: 2 of 2

Do you have Simulink and RTW licenses? If so, you should not need to open
Simulink, as the technology is exposed on the MATLAB command line with EMLC.
There are, however, limitations in Embedded MATLAB, regardless of whether it
is used in Simulink or from the MATLAB command line. Arrays must be
fixed-size, and consult the Embedded MATLAB documentation on which MATLAB
functions are supported.
--
Mike

"Juliette Salexa" <juliette.physicist@gmail.com> wrote in message
news:h3o194$3m$1@fred.mathworks.com...
> Several places say that one can convert an .m file into C using the
> real-time workshop toolbox.
>
> I haven't figured out how to do this without using simulink (I don't know
> how to use simulink and I'm not sure what the learning curve is like). Is
> there a way to do it without simulink ??
>
> If not, what can I actually DO with simulink in terms of converting .m
> files to C ...
> I'd be surprised if it could write a C code that does exactly what my
> m-file does ... since many of my subroutines involve functions that don't
> have analogous commands in C.
>
> Even better, is there a software that will convert my m-file (or part of
> it) into a fortran code ??

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
m file to c file Sprinceana 27 Aug, 2009 04:21:26
realtime worksh... Sprinceana 27 Aug, 2009 04:21:26
convert m to c Sprinceana 27 Aug, 2009 04:21:26
convert m to fo... Sprinceana 27 Aug, 2009 04:21:26
convert m code ... Sprinceana 27 Aug, 2009 04:21:26
convert m code ... Sprinceana 27 Aug, 2009 04:21:26
rssFeed for this Thread

Contact us at files@mathworks.com