Main Content
jc_0622: Usage of Fcn 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
When a Fcn block has operators with different priorities, parentheses shall be used to specify the priority order.
Custom Parameter
Not Applicable
Rationale
Sub ID a:
When operators have different priorities and the computation order is not clearly specified by using parentheses, readability is impaired and can be misinterpreted. This can result in unintended behavior.
Verification
Model Advisor check: Check for parentheses in Fcn block expressions (Simulink Check)
Last Changed
R2020a
See Also
Version History
Introduced in R2020a