Main Content

Execution inMATLAB

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.

Functions

expand all

Stateflow.exportAsClass ExportMATLABclass for standalone chart
Stateflow.exportToVersion Export standalone chart for use in previous version ofStateflow

Stateflow Syntax

expand all

Change Detection

hasChanged Detect change in data since last time step
hasChangedFrom Detect change in data from specified value
hasChangedTo Detect change in data to specified value

Temporal Logic

after Execute chart after event broadcast or specified time
at Execute chart at event broadcast or specified time
count Chart executions during which condition is valid
elapsed Time since state became active
every Execute chart at regular intervals
temporalCount Number of events, chart executions, or time since state became active

Topics

Troubleshooting

Debug a Standalone Stateflow Chart

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