主要内容

getRow

R2026b

Get state row by name from state transition table or parent row

Since R2026b

Description

row = getRow(stt,name) returns the top-level state row with the specified name from the state transition table stt as a Stateflow.StateTransitionTableRow object. This function does not return default transition path rows or inner transition path rows.

example

row = getRow(parentRow,name) returns the child state row with the specified name from parentRow. This function does not return default transition path rows or inner transition path rows.

Examples

collapse all

Retrieve a top-level state row from a state transition table.

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 the state row named "Idle".

row = getRow(stt, "Idle");

Input Arguments

collapse all

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

Parent state row from which to get the child state row, specified as a Stateflow.StateTransitionTableRow object.

Name of the state row to retrieve, specified as a string scalar or character vector.

Output Arguments

collapse all

State row with the specified name, returned as a Stateflow.StateTransitionTableRow object. If no state row with the specified name exists, the function returns an empty array.

Version History

Introduced in R2026b

expand all