mp_0047: Conditions that a nonempty statement must satisfy
Since R2024b
Guideline Publication
Control Algorithm Modeling Guidelines - Using MATLAB®, Simulink®, and Stateflow®
Sub ID Recommendations
NA-MAAB — a
JMAAB — a
MATLAB Versions
All
Rule
Sub ID a
A non-empty statement shall meet one of the following criteria:
Produces at least one side effect, regardless of how it is executed.
Has the capability to alter the control flow.
foo; bar == 1;
Rationale
Sub ID a:
Non-empty statements should be written to change data values or alter control flow, impacting the execution results in some way. Statements that do not meet these criteria are unnecessary and may not reflect the designer's intentions.
Verification
Model Advisor check: Check for usage of nonempty statements (Simulink Check)
Last Changed
R2024b
Version History
Introduced in R2024b