Main Content

sinkedTransitions

Identify transitions with specified destination

Description

transitions = sinkedTransitions(destination) returns an array of Stateflow.Transition objects with the specified destination.

example

Examples

collapse all

Find the transition that enters state A2.

Stateflow chart with a hierarchy of states. The outer state is called A. It contains two inner states called A1 and A2.

Open the model and access the Stateflow.Chart object for the chart.

open_system("sfHierarchyAPIExample")
ch = find(sfroot,"-isa","Stateflow.Chart");

Find the Stateflow.State object named A2.

sA2 = find(sfroot,"-isa","Stateflow.State",Name="A2");

Identify the transition whose destination is state A2. Display the name of the source.

tr = sinkedTransitions(sA2);
tr.Source.Name
ans = 
'A1'

Input Arguments

collapse all

Destination object, specified as a Stateflow® API object of one of these types:

Version History

Introduced in R2012a