Local temporary variables
Customize generated local temporary variable identifiers
Model Configuration Pane: Code Generation / Identifiers
Customize generated local temporary variable identifiers.
Appears only for ERT-based targets.
Requires Embedded Coder® when generating code.
$N$M (default) | string
Enter a macro that specifies whether, and in what order, certain text is to be included in the generated identifier. The macro can include a combination of the following format tokens.
Insert data type acronym (for example,
Insert name-mangling text if required to avoid naming collisions.
Insert name of object (block, signal or signal object, state, parameter, or parameter object) for which identifier is generated.
Insert root model name into identifier, replacing unsupported characters with the underscore (_) character.
Required for model referencing.
Insert text that you specify for the
Avoid name collisions. One way is to avoid using default block names (for example,
Gain2...) when your model has many blocks of the same type.
Where possible, increase the Maximum identifier length to accommodate the length of the identifiers that you expect to generate. Reserve at least three characters for name-mangling text.
To control the case (upper or lower case) of the text that each token represents, include decorators such as
[U_]in your macro. See Control Case by Using Token Decorators.
If you specify
$R, the value you specify for Maximum identifier length must be large enough to accommodate full expansions of the
When a name conflict occurs between an identifier within the scope of a higher-level model and an identifier within the scope of a referenced model, the code generator preserves the identifier from the referenced model. Name mangling is performed on the identifier in the higher-level model.
This option does not impact objects (such as signals and parameters) that have a storage class other than
|Type: character vector
|Value: valid combination of tokens
Introduced in R2006b