jc_0804: Prohibited use of recursive calls with graphical functions
R2026bGuideline 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
Calls from a graphical function to itself and calls between graphical functions shall be prohibited.
Not Applicable
Processing is performed within the graphical function.

The graphical function is calling itself.

Graphical functions are calling each other.

Rationale
Sub ID a:
Readability decreases. Deviation from the rule can cause unintended overflows and infinite loops.
Verification
Model Advisor check: Check usage of graphical functions in Stateflow (Simulink Check).
Last Changed
R2020a
See Also
Reuse Logic Patterns by Defining Graphical Functions (Stateflow)
How Stateflow Objects Interact During Execution (Stateflow)
Version History
Introduced in R2020a