| Contents | Index |
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.
Some states are exclusive (only one can be active at a time) while others are parallel (can be active concurrently).
Transitions can be triggered by events and conditions.
States can execute actions while they are active.
Directed-event broadcasts trigger selective execution of chart logic.
This chart is part of a model called sf_car that ships with the Stateflow product. To explore the model further, run it from your MATLAB Command Window, as described in Simulink Demo Models in the Simulink documentation.
![]() | Benefits of Stateflow Usage | How Stateflow Software Works with Simulink Software | ![]() |

Learn how engineers use Stateflow to model state machines in their Simulink models.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |