jc_0702: Use of named Stateflow parameters and constants
Sub ID Recommendations
NA-MAAB — a
JMAAB — a
MATLAB Versions
All
Rule
Sub ID a
Stateflow block shall not use numeric literal.
Initial value is 0
Increment, decrement 1
Not Applicable
Numeric literals are not used.
Numeric literals are used.
Rationale
Sub ID a:
Only the modeler will understand the purpose of the value when numeric literals are used to write constants, which decreases readability.
Constants that are intended for calibration are generated in the code using numeric literals.
Verification
Model Advisor check: Check usage of numeric literals in Stateflow (Simulink Check)
Last Changed
R2020a
See Also
JMAAB guideline jc_0702, which is available in Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow on the MathWorks® website.
Guidelines for Naming Stateflow Objects (Stateflow)
Version History
Introduced in R2020a