Main Content

jc_0752: Condition action in transition label

Since R2020a

Guideline Publication

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

Sub ID Recommendations

  • NA-MAAB — No recommendations

  • JMAAB — a

MATLAB Versions

All

Rule

Sub ID a

Parentheses in condition actions shall use only curly brackets on a single line.

A new line shall start before and after curly brackets.

Custom Parameter

Not Applicable

Example — Correct

Note: The example is for a flow chart, but the rule also applies to state transitions.

Example — Incorrect

Rationale

Sub ID a:

  • Clarifying condition actions improves readability.

Verification

Model Advisor check: Check usage of parentheses in Stateflow transitions (Simulink Check)

Last Changed

R2020a

Version History

Introduced in R2020a