Main Content

db_0137: States in state machines

Since R2020a

Guideline Publication

Control Algorithm Modeling Guidelines - Using MATLAB®, Simulink®, and Stateflow®

Sub ID Recommendations

  • NA-MAAB — a

  • JMAAB — a

MATLAB Versions



Sub ID a

When the Decomposition for the Chart block or State is set to OR (Exclusive), there shall be at least two states in the hierarchy.

Custom Parameter

Not Applicable

Example — Incorrect

The hierarchy contains only one state when the Decomposition option is set to OR (Exclusive)


Sub ID a:

  • Redundant descriptions impair readability.

  • Generated code includes unnecessary state variables.


Model Advisor check: Check for state in state machines (Simulink Check)

Last Changed


Version History

Introduced in R2020a