Detection of state inconsistencies, data range violations, and transition conflicts

In Stateflow®, step through your simulation in detail. You can set breakpoints, watch data values, and step through different functions in your state diagrams.

Examples and How To

Basic Approach to Debugging Charts

You can perform most debugging tasks directly from the chart in the Stateflow Editor.

Animate Stateflow Charts in External Mode

If you have a Stateflow license, you can animate a chart in external mode.

Animate Stateflow Charts

During simulation, animation provides visual verification that your chart behaves as you expect.

Set Breakpoints to Debug Charts

You enable debugging for a chart when you set a breakpoint.

Watch Stateflow Data Values

Shows you a variety of ways that you can keep track of the values for Stateflow data and self activity during simulation

Manage Stateflow Breakpoints and Watch Data

In the Breakpoints tab of the Stateflow Breakpoints and Watch window, you can enter a MATLAB expression as a condition on a Stateflow breakpoint.

Control Chart Execution from the Stateflow Editor

Control Chart Execution from the Stateflow Editor

Debug Run-Time Errors in a Chart

Shows you how to debug run-time errors in Stateflow charts with an example model

Change Data Values During Simulation

Shows how to change Stateflow data values during simulation while the chart is in debug mode

Debug Run-Time Errors in a State Transition Table

Use breakpoints to debug state transition tables.


Commenting Stateflow Objects in a Chart

Describes how to comment out Stateflow objects to exclude them from simulation.

Common Modeling Errors Stateflow Can Detect

Describes common modeling errors that are flagged by Stateflow

Guidelines for Avoiding Unwanted Recursion in a Chart

Describes guidelines for avoiding unwanted recursive behavior

Was this topic helpful?