Reduce code size or improve code traceability by controlling the generation of
comments. The comments appear interleaved in the code that initializes the fields of
the model parameter structure, which appears in the
file or the
model
_data.c
file. Each comment
indicates the name of a parameter object (model
.cSimulink.Parameter
) or MATLAB® variable and the blocks that use the object or variable to set
parameter values.
Parameter objects and MATLAB variables appear in the model parameter structure under either of these conditions:
You apply the storage class Model default
to the
object or variable and, in the Code Mappings editor, you set the storage
class of the corresponding category of data to the default setting,
Default
.
You apply the storage class Auto
to the object or
variable and set the model configuration parameter Default
parameter behavior to Tunable
.
In the Code Mappings editor, you set the storage class of the
corresponding category of data to the default setting,
Default
.
For more information about parameter representation in the generated code, see How Generated Code Stores Internal Signal, State, and Parameter Data.
Category: Code Generation > Comments
Default: On
Generate comments regardless of the number of parameter values stored in the parameter structure. Use this setting to improve traceability between the generated code and the parameter objects or variables that the model uses.
Generate comments only if the parameter structure contains fewer than
1000 parameter values. An array parameter with
n
elements represents
n
values. For large models, use this
setting to reduce the size of the generated file.
Include comments enables this parameter.
Parameter:
ForceParamTrailComments |
Type: character vector |
Value:
'on' | 'off' |
Default:
'on'
|
Application | Setting |
---|---|
Debugging | On |
Traceability | On |
Efficiency | No impact |
Safety precaution | No recommendation |