How do I restore a state in the stateflow
Show older comments
I am trying to set up a simulation environment for a state flow model. It would be very handy to be able to save and store (and maybe alter) a simulation state, however I read and tried several thing using the Simstate and the Final state on a small example but I cannot get this working.
I tried to restore the state of a very simple on/off state machine like this:


I managed to read the state at the end of the simulation, and to simulate again from the stop of my previous simulation using the Initial State and Final states checkbox in the Configuration parameters of the simulation.
However if I change something small in the top model (e.g. add 1 to the sine signal) then the simulation doesn't run anymore as it doesn't allow changes in the model.
If I read the documentation correctly it shows that this should be possible using the Final state: "In some cases, saving partial state information avoids some of the limitations of using SimState".
I cannot get this working however.
Regards,
Geert
Answers (0)
Categories
Find more on Stateflow 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!