setBlockSimState

Class: Simulink.SimState.ModelSimState
Package: Simulink.SimState

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

Syntax

setBlockSimState(x,'blockpath', blockSimState)

Description

setBlockSimState(x,'blockpath', blockSimState) sets the SimState of the block specified as blockpath. blockpath must be either a Stateflow Chart, MATLAB Function, or S-function block. For other types of blocks, see the loggedStates property of the Simulink.SimState.ModelSimState class.

Input Arguments

x

The argument x is a Simulink.SimState.ModelSimState object.

blockpath

The path to the block for which you are setting the SimState values

blockSimState

The SimState of the block specified.

Examples

newObj = setBlockSimState(obj, 'mymodel/chart', newChartState);
Was this topic helpful?