Set previously active substate
Modify Previously Active Child
For more information about this model, see Model Bang-Bang Temperature Control System.
Set the model to save the final operating point. Open the Configuration Parameters dialog box and, in the Data Import/Export pane:
Select Final states and enter a name for the operating point. For this example, use
Select Save final operating point.
Set the stop time for this simulation segment. In the Simulation tab, set Stop Time to
Run the simulation.
Stateflow.op.BlockOperatingPointobject that contains the operating point information for the
blockpath = "sf_boiler/Bang-Bang Controller"; op = get(xFinal,blockpath);
Verify that the state
Onin the box
Heateris not active.
ans = logical 0
Find the previously active substate of state
ans = State: "HIGH" (handle) Path: sf_boiler/Bang-Bang Controller/Heater/On/HIGH Contains: 
Modify the previously active substate of state
On. Specify the substate as a
Stateflow.op.OperatingPointContainerobject.Alternatively, specify the name of the substate by using a string scalar or a character vector.
Verify that the substate
NORMis the previously active substate in the modified operating point.
ans = State: "NORM" (handle) Path: sf_boiler/Bang-Bang Controller/Heater/On/NORM Contains: 
stateOp — Operating point for state
Operating point for an inactive state that contains a history junction, specified as
substateOp — Operating point for substate
Operating point for the new previously active substate, specified as a
substateName — Name of substate
string scalar | character vector
Name of the new previously active substate, specified as a string scalar or a character vector.
Introduced in R2009b