Main Content

sourcedTransitions

Identify transitions with specified source

Description

example

transitions = sourcedTransitions(source) returns an array of Stateflow.Transition objects with the specified source.

Examples

collapse all

Find the transition that exits state A1.

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 A1.

sA1 = find(sfroot,"-isa","Stateflow.State",Name="A1");

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

tr = sourcedTransitions(sA1);
tr.Destination.Name
ans = 
'A2'

Input Arguments

collapse all

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

Version History

Introduced before R2006a