Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: How to test a C code generated from Simulink?
Replies: 1   Last Post: Aug 30, 2010 7:39 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
karthikeyan

Posts: 15
Registered: 1/12/09
Re: How to test a C code generated from Simulink?
Posted: Aug 30, 2010 7:39 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi

As your build your model, there will be an executable created for the model. There are many ways to log your C code output.You can add To workspace or log the output(http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/ug/f11-46877.html). If you had this setting and build the model, and run the executable in the matlab. Output will be logged in the mat file. You can compare the model output and output in the mat file obtained from the C code.




"Claudio " <cl.costa@gmail.com> wrote in message <i0ljn8$sps$1@fred.mathworks.com>...
> Dear Sirs,
> I am writing to you because I have a little problem about the testing of the C code generated from a block diagram built in Simulink.
> In practice I would like to know how to "feed" my C code (built with a System Target file grt.tlc) with the correct inputs and so to let it generate the outputs.
> I need this because I would compare the outputs of the Simulink block diagram with the outputs computed by the C code.
>
> Thanks to everybody!




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.