主要内容

addTransitionColumn

R2026b

Add transition column to state transition table

Since R2026b

Description

cells = addTransitionColumn(stt) appends a transition column to the state transition table stt and returns an array of Stateflow.StateTransitionTableCell objects, one per row in the table.

example

Examples

collapse all

Add a transition column and set conditions and destinations for the transition cells.

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 state rows and a transition column. Then configure the transition cells.

row1 = addStateRow(stt);
row1.Name = "Idle";
row2 = addStateRowBelow(row1);
row2.Name = "Active";
cells = addTransitionColumn(stt);
idleCell = getTransitionCell(stt, 1, 1);
idleCell.Condition = "start";
idleCell.Destination = "Active";

Input Arguments

collapse all

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

Output Arguments

collapse all

Transition cells for the new column, returned as an array of Stateflow.StateTransitionTableCell objects. The array contains one cell for each row in the table. Use the Condition, Action, and Destination properties to configure each cell.

Version History

Introduced in R2026b

expand all