Execution in MATLAB

Execute standalone Stateflow® charts as objects in MATLAB®

Design logic by using state charts and execute that logic as MATLAB programs. Execute and unit test your chart in the Stateflow editor. Control the behavior of user interfaces and data processing applications through your chart.

Stateflow Syntax

expand all

afterControl chart execution with the after operator
countControl chart execution with the count operator
elapsedControl chart execution with the elapsed operator
everyControl chart execution with the every operator
temporalCountControl chart execution with the temporalCount operator

Topics

Create Stateflow Charts for Execution as MATLAB Objects

Save standalone Stateflow charts outside of Simulink® models.

Execute and Unit Test Stateflow Chart Objects

Run Stateflow charts in MATLAB or through the Stateflow editor.

Debug a Standalone Stateflow Chart

Interrupt execution to step through each action in a Stateflow chart.

Execute Stateflow Chart Objects Through Scripts and Models

Create a MATLAB script or a Simulink model that invokes a standalone Stateflow chart.

Design Human-Machine Interface Logic by Using Stateflow Charts

Create standalone Stateflow charts that interact with MATLAB user interfaces.

Model a Communications Protocol by Using Chart Objects

Use Stateflow to implement a frame-synchronization and symbol-detection algorithm.

Implement a Financial Strategy by Using Stateflow

Design a standalone Stateflow chart that issues instructions for trading stocks.

Featured Examples