Enable run-time recursion for MATLAB functions
Option to allow recursive functions in MATLAB Function blocks, Stateflow charts, and MATLAB System blocks
Model Configuration Pane: Simulation Target
Description
The Enable run-time recursion for MATLAB functions parameter specifies whether to allow MATLAB® code for MATLAB Function blocks, Stateflow® charts, and MATLAB System blocks to contain recursive functions. Some coding standards, such as MISRA™, do not allow recursion. To increase the likelihood that generated code is compliant with MISRA C™, clear this parameter.
Settings
on (default) | offonAllows recursive functions and enables run-time recursion when generating code from MATLAB code that contains recursive functions.
offDoes not allow recursive functions. The software issues an error if you generate code from a model that uses MATLAB code that requires run-time recursion.
Recommended Settings
| Application | Setting |
|---|---|
| Debugging | No recommendation |
| Traceability | No recommendation |
| Efficiency | No recommendation |
| Safety precaution | No recommendation |
Programmatic Use
Parameter: EnableRuntimeRecursion |
| Type: string | character vector |
Values:
'on' | 'off' |
Default: 'on' |
Version History
Introduced in R2016b