| Contents | Index |
A SimState is the snapshot of the state of a model at a specific time during simulation. For a Stateflow chart, a SimState includes the following information:
Activity of chart states
Values of chart local data
Values of chart output data
Values of persistent data in MATLAB functions and Truth Table blocks
A SimState lists chart objects in hierarchical order:
Graphical objects grouped by type (box, function, or state) and in alphabetical order within each group
Chart data grouped by scope (block output or local) and in alphabetical order within each group
For example, the following SimState illustrates the hierarchical structure of chart objects.
c =
Block: "shift_logic" (handle) (active)
Path: sf_car/shift_logic
Contains:
+ gear_state "State (AND)" (active)
+ selection_state "State (AND)" (active)
gear "Block output data" double [1, 1]
down_th "Local scope data" double [1, 1]
up_th "Local scope data" double [1, 1]The tree structure maps graphical and nongraphical objects to their respective locations in the chart hierarchy. If name conflicts exist, one or more underscores appear at the end of a name so that all objects have unique identifiers in the SimState hierarchy.
Note Stateless flow charts have an empty SimState, because they do not contain states or persistent data. |
For information about using a SimState for other blocks in a Simulink model, see Saving and Restoring the Simulation State as the SimState in the Simulink User's Guide.
![]() | Saving and Restoring Simulations with SimState | Benefits of Using a Snapshot of the Simulation State | ![]() |

Learn how engineers use Stateflow to model state machines in their Simulink models.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |