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

Suppose that ch is the Stateflow.Chart object that corresponds to this chart.

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

Find the Stateflow.State object named A1.

sA1 = find(ch,'-isa','Stateflow.State','Name','A1');

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

tr = sinkedTransitions(sA1);
tr.Destination.Name
ans =

    'A2'

Input Arguments

collapse all

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

Introduced before R2006a