jc_0711: Division in Stateflow
Since R2020a
Guideline Publication
Control Algorithm Modeling Guidelines - Using MATLAB®, Simulink®, and Stateflow®
Sub ID Recommendations
NA-MAAB — a1/a2
JMAAB — a1/a2
MATLAB Versions
All
Rule
Sub ID a1
Variables, constants, or parameters in Stateflow Chart (Stateflow) shall not be used to perform division operations.
Not Applicable
Division is performed outside of the Stateflow Chart.
Division occurs within the Stateflow Chart.
Sub ID a2
When division occurs in a Stateflow Chart (Stateflow), the process shall prevent division by zero.
Not Applicable
The process is defined to prevent division by zero.
The process does not prevent division by zero.
Rationale
Sub ID a1, a2:
Deviation from the rule can cause unintended operation and code generation results.
Verification
Model Advisor check: Adherence to this modeling guideline cannot be verified by using a Model Advisor check.
Last Changed
R2020a
See Also
Fixed-Point Operations in Stateflow Charts (Stateflow)
Version History
Introduced in R2020a