na_0003: Usage of If blocks
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
For the If
block, the if
expression and
elseif
expression shall be used
only to define input signals.
Not Applicable
The if
expression only defines the
input variables.
The if
expression defines a
comparison operation.
Rationale
Sub ID a:
Visual comprehension of control conditions is easier when logical operations are described outside of the If block.
Describing logical operations outside of the If block allows verification to focus on the logical operation.
Verification
Model Advisor check: Check logical expressions in If blocks (Simulink Check)
Last Changed
R2020a
See Also
Version History
Introduced in R2020a