Running an exe built with rapid simulation target with Initial states as input

1 view (last 30 days)
I've compiled a simulink model with rapid simulation target, so now I have an .exe file.
As usually, I can tell the exe to run with certain inputs:
!model.exe -i Inputs.mat
Or maybe I change the parameters inside the model:
!model.exe -p Params.mat
I've been reading the rapid simulation guide, but I cannot find the way to change the INITIAL STATES (by default xInitial). This is an optional argument in the model configuration parameters, under Data Import/Export.
The point is that I want to run consecutive simulations preserving the states between them, so the final states (xFinal -which is possible to log with the .exe execution-) of the first simulation will be the initial states (xInitial -which I cannot load into the exe-).
Is there any way to load the inital states into the .exe. I've already tried telling that xInital is part of the tunable parameters, but it never appears into the final structure. the only way I can make it appear is setting the output as an array and using xInitial as a constant for an idle operation, but it does not make the initial states work.
I don't want to use a specific parameter for each of the delays and integrators present in the model, as there are like 600 of them.
  1 Comment
Kaustubha Govind
Kaustubha Govind on 18 Jul 2013
I don't think the RSIM target currently allows loading of initial states. You may want to confirm with MathWorks Technical Support and file an enhancement request.

Sign in to comment.

Answers (0)


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!

Translated by