What do I need to compile a Simulink Model?

9 views (last 30 days)
I need to compile a Matlab tool that uses a Simulink model. The model gets variables from the Matlab base workspace and sends its results also to the base workspace. Do I need anything else than the Matlab Compiler and rtwbuild from Simulink Coder? How can I use the code from Simulink Coder in my Matlab tool?

Accepted Answer

Friedrich
Friedrich on 8 Aug 2013
Edited: Friedrich on 8 Aug 2013
Hi,
example and explanation here.
  3 Comments
Benjamin
Benjamin on 26 Aug 2013
Hi, at the moment I am stuck at point 4 of the explanation above. How can I run the whole simulation of the Model in the library? For the Simulink model I used set_param('model','StopFcn',...) sim('model') What would be the equivalent functions for the library?
Kaustubha Govind
Kaustubha Govind on 26 Aug 2013
Benjami: As is described in the application example for calling into shared libraries generated by Embedded Coder, you decide how to code the loop around the call to the mdl_step() function. (Essentially the SIM command also calls this function in a loop - in the same sequence of things that the application example shows)

Sign in to comment.

More Answers (0)

Categories

Find more on Simulink Coder in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!