Simulink.SimState.ModelSimState class

Package: Simulink.SimState

Access SimState snapshot data


The Simulink.SimState.ModelSimState class contains all of the information associated with a “snapshot” of a simulation, including the logged states, the time of the snapshot, and the start time of the simulation. To access these data for a block, use the getBlockSimState method or the loggedStates property.



Specify a description. By default, Simulink® generates a character vector based on your model name.


The logged states are the continuous and discrete states of the blocks in a model. These states represent a subset of the complete simulation state (SimState) of the model.

If loggedStates is in Dataset format, you cannot assign a structure or a Simulink.SimulationData.Dataset object with a different number of elements than that of the Dataset object used for loggedStates.

If the loggedStates is in Structure format, you cannot assign a Dataset object.



loggedStates is obtained from the saved states of the block. loggedStates depends on the full state being saved in the SimState object, unlike, properties like description, which are independent of the save states.


Time at which Simulink takes a “snapshot” of the complete simulation states. This data is read only.


Time at which the simulation starts. This data is read only.


getBlockSimState Access SimState of individual Stateflow Chart, MATLAB Function, or S-function block
setBlockSimState Set SimState of individual Stateflow Chart, MATLAB Function, or S-function block

Copy Semantics

Value. To learn how value classes affect copy operations, see Copying Objects (MATLAB) in the MATLAB® Programming Fundamentals documentation.

Was this topic helpful?