Verbose comments for 'Model default' storage class
Reduce code size or improve code traceability
Model Configuration Pane: Code Generation / Comments
Description
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 toTunable
. 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.
Dependencies
Include comments enables this parameter.
Settings
on
(default) | off
Default: On
- 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.
- Off
Generate comments only if the parameter structure contains fewer than 1000 parameter values. An array parameter with
n
elements representsn
values. For large models, use this setting to reduce the size of the generated file.
Recommended Settings
Application | Setting |
---|---|
Debugging | On |
Traceability | On |
Efficiency | No impact |
Safety precaution | No recommendation |
Programmatic Use
Parameter: ForceParamTrailComments |
Type: character vector |
Value: 'on' | 'off' |
Default: 'on' |
Version History
Introduced before R2006a