Stateflow.SimulinkBasedState

Create Simulink based state

Syntax

Simulink_based_state_new = Stateflow.SimulinkBasedState(parent)

Description

The Stateflow.SimulinkBasedState method is a constructor method for creating a Simulink® based state in a parent chart, state, or box. This method returns a handle to the new SimulinkBasedState object. For more information on Simulink based state, see Simulink Subsystems as States.

Arguments

parent

Handle to the object for the parent chart, state, or box that contains the new atomic subchart

Returns

Simulink_based_state_new

Handle to Simulink based state object for newly created Simulink based state

Examples

If sA is a handle to a State object for the existing state A, the following command creates a new Simulink based state parented (contained) by state A:

Simulink_based_state_new = Stateflow.SimulinkBasedState(sA)

The new Simulink based state appears in the upper left corner of state A in the chart. Simulink_based_state_new is a handle to the new Simulink based state object that you can use to rename the Simulink based state, set its properties, and execute its methods.

Introduced in R2017b