From: mahesh on
Hi,
I just wanted to know what is the easiest way to export a C program to simulink,do we need to convert the c program to mex file?

Thanks,
Mahesh
From: dk on
On Jul 21, 2:27 am, "mahesh " <mahesh...(a)gmail.com> wrote:
> Hi,
>      I just wanted to know what is the easiest way to export a C program to simulink,do we need to convert the c program to mex file?
>
> Thanks,
> Mahesh

Yes. after the MEX file generation you have to use S-Function block at
Simulink to use that C-Program.
From: Nevine on
> Yes. after the MEX file generation you have to use S-Function block at
> Simulink to use that C-Program.

If you have an existing C program, you can integrate it into Simulink models by using the Legacy Code Tool. See:

http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/sfg/bq4g1es-1.html