Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Anatomy of a Stateflow Chart

Here is an example of a Stateflow® chart, which models as a finite-state machine the logic required to shift gears in an automatic transmission system of a car:

Notice the following details in this chart:

  • Each gear and shift position is represented by a state.

  • States having a dashed boundary, such as gear_state and selection_state, are parallel (can be active concurrently).

  • States with a solid boundary, such as first, second, third and fourth, are exclusive (only one can be active at a time).

  • Transitions can be triggered by events and conditions.

  • Directed-event broadcasts, such as UP and DOWN, trigger selective execution of chart logic.

This chart is part of an example model called sf_car that ships with the Stateflow product. To explore the model further, open it by typing sf_car at the command prompt in the MATLAB® Command Window.

Was this topic helpful?