Main Content

Compile-time recursion limit for MATLAB functions

Instance specialization limit for MATLAB Function blocks, Stateflow charts, and MATLAB System blocks in generated code

Model Configuration Pane: Simulation Target

Description

The Compile-time recursion limit for MATLAB functions parameter specifies the number of specialized instances of a MATLAB function allowed in code generated for MATLAB Function blocks, Stateflow® charts, and MATLAB System blocks that use compile-time recursion. The limit that you specify applies in simulation and code generation.

Settings

50 (default) | integer greater than or equal to 0

For most functions that require specialization, the default compile-time recursion limit of 50 is large enough. If code generation fails because of the limit, you can:

  • Increase the limit.

  • Change the MATLAB code so that code generation uses run-time recursion instead.

To disallow specialization in the MATLAB code, set this parameter to 0.

Recommended Settings

ApplicationSetting
DebuggingNo recommendation
TraceabilityNo recommendation
EfficiencyNo recommendation
Safety precautionNo recommendation

Programmatic Use

Parameter: CompileTimeRecursionLimit
Type: integer greater than or equal to 0
Default: 50

Version History

Introduced in R2016b