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.

Blocks

ChartImplement control logic with finite state machine

Topics

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

Combine State Actions to Eliminate Redundant Code

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

Detect Changes in Data Values

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

Control Function-Call Subsystems by Using Bind Actions

Bind a function-call output event to the activity of a state.

Simplify Stateflow Chart Using the duration Operator

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

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.

Check State Activity by Using the in Operator

Determine if a state is active during chart execution through the in operator.

Call Extrinsic Functions in a Stateflow Chart

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

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

Control States in Charts Enabled by Function-Call Input Events

Set the behavior of states when a function-call input event reenables a chart.

Featured Examples