Main Content

addStateRow

R2026b

Add state row to state transition table

Since R2026b

Description

row = addStateRow(stt) adds a state row to the state transition table stt and returns the new row as a Stateflow.StateTransitionTableRow object. The new row appends to the end of the table.

example

Examples

collapse all

Create a state row and assign it a name.

Open a model that contains a state transition table and get a handle to the table.

open_system("myModel")
stt = find(sfroot, "-isa", "Stateflow.StateTransitionTableChart", ...
    Name="mySTT");

Add a state row to the table and set its name.

row = addStateRow(stt);
row.Name = "Idle";

Input Arguments

collapse all

State transition table to which to add the state row, specified as a Stateflow.StateTransitionTableChart object.

Output Arguments

collapse all

New state row, returned as a Stateflow.StateTransitionTableRow object. The row has a RowType of "state". Set the Name property to assign a state name to the row.

Version History

Introduced in R2026b

expand all