Inline invariant signals
Transform symbolic names of Invariant signals in generated code
Model Configuration Pane: Code Generation / Optimization
Description
The Inline invariant signals parameter instructs the code generator to transform symbolic names of invariant signals into constant values.
An invariant signal is a block output signal that does not change during Simulink® simulation. For example, in the following model the signal
S3 is an invariant signal. An invariant
signal is not the same as an invariant constant. The
two constants (1 and 2) and the gain value of 3 are invariant constants. To inline
invariant constants, set Default parameter behavior to
Inlined.

Category: Optimization
Dependencies
This parameter is enabled when you set Default parameter behavior to Inlined.
Settings
off (default) | on- On
Simulink Coder™ software uses the numerical values of model parameters, instead of their symbolic names, in generated code. An invariant signal is not inline if it is nonscalar, complex, or the block inport the signal is attached to takes the address of the signal.
- Off
Uses symbolic names of model parameters in generated code.
Examples
Recommended Settings
| Application | Setting |
|---|---|
| Debugging | Off |
| Traceability | Off |
| Efficiency | On |
| Safety precaution | No impact |
Programmatic Use
Parameter: InlineInvariantSignals |
| Type: character vector |
Value: 'on' | 'off' |
Default: 'off' |
Version History
Introduced before R2006a
