Main Content

Support: non-finite numbers

Code generation for nonfinite data

Model Configuration Pane: Code Generation / Interface


The Support: non-finite numbers parameter specifies whether to generate code for nonfinite data and operations on nonfinite data.

If you clear this parameter for the top model, clear the parameter for referenced models.

If you select the MAT-file logging parameter, select this parameter.


If the System target file parameter is set to an ERT-based system target file:

  • To enable this parameter, select the Support: floating-point numbers parameter.

  • If you select the MAT-file logging parameter, select parameters Support: floating-point numbers and Support: non-finite numbers.


on (default) | off

Enables generation of nonfinite data (for example, NaN and Inf) and related operations.


Disables generation of nonfinite data and operations. If you clear this parameter, an error occurs if the code generator encounters non-finite data or expressions. The error message reports offending blocks and parameters.


Code generation is optimized with the assumption that nonfinite data are absent. However, if your application produces nonfinite numbers through signal data or MATLAB® code, when processing the nonfinite data, the behavior of the generated code might be inconsistent with simulation results.

Recommended Settings

DebuggingNo impact
TraceabilityNo impact
EfficiencyOff (execution, ROM), No impact (RAM)
Safety precaution

No recommendation

Programmatic Use

Parameter: SupportNonFinite
Type: character vector
Value: 'on' | 'off'
Default: 'on'

Version History

Introduced before R2006a

expand all