主要内容

getTransitionColumn

R2026b

Get transition cells for column in state transition table

Since R2026b

Description

cells = getTransitionColumn(stt,column) returns the transition cells for the specified column in the state transition table stt as an array of Stateflow.StateTransitionTableCell objects. Specify the column by name (such as "IF" or "ELSE-IF(2)") or by numeric index.

example

Examples

collapse all

Retrieve transition cells from a specific column by using a column name or numeric index.

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");

Get transition cells by column name and by column index.

% Get cells from the first transition column by name
cells1 = getTransitionColumn(stt, "IF");

% Get cells from the second transition column by index
cells2 = getTransitionColumn(stt, 2);

Input Arguments

collapse all

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

Column to retrieve, specified as a string or character vector containing the column header name (such as "IF" or "ELSE-IF(2)"), or as a positive integer indicating the column index. Use getTransitionColumnHeaders to view available column names.

Output Arguments

collapse all

Transition cells for the specified column, returned as an array of Stateflow.StateTransitionTableCell objects. The array contains one cell for each row in the table.

Version History

Introduced in R2026b

expand all