f



coverse a Matlab.mdl into C / C++ code and how to use this code

Hello help,

I am a dutch student which want to integrate a simply matlab.mdl in a
C++ program. But how do I do that? I have one in and output. In the
model there will be added a constant to this input. So its just a
simple example to learn how to integrate generated code into C or
C++.

I did the same by labview and there was a clearly guide for doing
this.

Building DLLs in LabVIEW 6.x or later:
 <http://zone.ni.com/devzone/conceptd.nsf/webmain/5df85b448eb081d8862568ff006a0b20>

Calling a DLL from Microsoft Visual C++ that Was Generated by LabVIEW
6i:
 <http://zone.ni.com/devzone/devzoneweb.nsf/Opendoc?openagent&FCF8C388FD07522B862569060074F0CB>

I have a fully licend matlab simulink product with the realtime
workshop toolbox. With this toolbox it is possible to make C code
from a model. This is the way I want to do it because making .dll has
more overhead.

But how do I get the SIMPLY information for integrating this code in
C or C++. It would be nice if there is a guideline like the one of
Labview ( see links ). Or do they have a better product? :P

Is there somebody who did this before? Or knows exactly where to find
the information I need?

Greets,

Bart-Jan
0
3/30/2006 2:08:46 PM
comp.soft-sys.matlab 211265 articles. 25 followers. lunamoonmoon (257) is leader. Post Follow

1 Replies
1239 Views

Similar Articles

[PageSpeed] 53

Bart-Jan wrote:
> Hello help,
>
> I am a dutch student which want to integrate a simply matlab.mdl in a
> C++ program. But how do I do that? I have one in and output. In the
> model there will be added a constant to this input. So its just a
> simple example to learn how to integrate generated code into C or
> C++.
>
> I did the same by labview and there was a clearly guide for doing
> this.
>
> Building DLLs in LabVIEW 6.x or later:
>  <http://zone.ni.com/devzone/conceptd.nsf/webmain/5df85b448eb081d8862568ff006a0b20>
>
> Calling a DLL from Microsoft Visual C++ that Was Generated by LabVIEW
> 6i:
>  <http://zone.ni.com/devzone/devzoneweb.nsf/Opendoc?openagent&FCF8C388FD07522B862569060074F0CB>
>
> I have a fully licend matlab simulink product with the realtime
> workshop toolbox. With this toolbox it is possible to make C code
> from a model. This is the way I want to do it because making .dll has
> more overhead.
>
> But how do I get the SIMPLY information for integrating this code in
> C or C++. It would be nice if there is a guideline like the one of
> Labview ( see links ). Or do they have a better product? :P
>
> Is there somebody who did this before? Or knows exactly where to find
> the information I need?
>
> Greets,
>
> Bart-Jan

I don't understand what the problem you're having is. You say you have
realtime workshop, so then generating code should be really easy after
that. I've never used it for C++ code generation because RTW does not
support C++ for my target but maybe this link will help you:
http://www.mathworks.com/access/helpdesk/help/toolbox/rtw/ug/bp69m6b.html

Also look at
http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/ug/f11-35866.html
to understand how to configure RTW for your intended target.

Once you have all the options setup correctly generating code is as
easy as opening the model and pressing CTRL+B

HTH,
Ashish.

0
3/30/2006 5:41:35 PM
Reply: