Main Content

defaultTransitions

Identify default transitions in specified object

Description

example

transitions = defaultTransitions(parent) returns an array of Stateflow.Transition objects that correspond to the default transitions at the top level of the specified parent object. For more information, see Default Transitions.

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.

Identify the default transition at the top level of the chart. Display the name of the destination.

tr1 = defaultTransitions(ch);
tr1.Destination.Name
ans =

    'A'

Save the Stateflow.State object that corresponds to state A.

state = tr1.Destination;

Identify the default transition at the top level of the state A. Display the name of the destination.

tr2 = defaultTransitions(state);
tr2.Destination.Name
ans =

    'A1'

Input Arguments

collapse all

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

Tips

  • To identify default transitions inside a Stateflow.Box, call the defaultTransitions function on the Stateflow.Chart, Stateflow.Function, or Stateflow.State object that contains the box.

Introduced before R2006a