This is machine translation

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

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Syntax for States and Transitions

Express actions and conditions with chart elements

Control the execution of your Stateflow® chart by specifying when the states transition and when actions are executed. You can synchronize state execution by using broadcast events and check which states are active during chart execution. To define actions or conditions, use C or MATLAB® as the action language.


ChartImplement control logic with finite state machine


Supported Operations on Chart Data

Describes the available data operations in state actions and transition conditions

Supported Symbols in Actions

Learn about symbols you can use in actions

Modeling Rules That Stateflow Detects During Edit Time

Discover modeling errors as you design in the Stateflow editor.

Trace Data, Events, and Messages Through the Symbols Window

View uses of nongraphical data in the state machine

Combine State Actions to Eliminate Redundant Code

Explains how to combine entry, during, and exit actions in a state

Execution of Actions in States and Transitions

Learn the differences in execution between a transition action and a condition action.

Call Extrinsic Functions in a Stateflow Chart

The following example shows how to call extrinsic functions in a Stateflow chart.

Detect Changes in Data Values

Describes how to detect changes in Stateflow data values at each time step.

Broadcast Events to Synchronize States

Describes how to use directed local event broadcasts

Control Chart Execution Using Temporal Logic

Learn how to use temporal logic operators.

Control Chart Execution Using Implicit Events

Describes events that a Stateflow chart triggers implicitly for actions such as entry in or exit from a state

Simplify Stateflow Chart Using the duration Operator

Learn how to use duration to simplify Stateflow charts with rapid state switching.

Check State Activity

Describes how to check state activity during chart execution

Control Function-Call Subsystems Using Bind Actions

Describes how to bind a function-call subsystem to a state

Resolve Undefined Symbols in Your Chart

Describes the process of resolving undefined data, event, and graphical function symbols

Count Events

Describes how to count occurrences of explicit and implicit events

Access Built-In MATLAB Functions and Workspace Data

Tells you how you can call MATLAB functions and access MATLAB workspace variables, using the ml namespace operator or the ml function

Call C Functions in C Charts

Describes the C functions that you can call directly in state and transition labels

Was this topic helpful?