Main Content
MATLAB source code as comments
Include MATLAB source code as comments
Model Configuration Pane: Code Generation / Comments
Description
Specify whether to insert MATLAB® source code as comments.
Dependencies
Include comments enables this parameter.
Settings
off
(default) | on
- On
Inserts MATLAB source code as comments in the generated code. The comment appears after the traceability tag and precedes the associated generated code. For example,
Selecting this parameter adds the MATLAB code/* '<S2>:1:22' xb1 = x-1; */ xb1 = x;
xb1 = x-1;
in the traceability comment.Includes the function signature in the function banner.
- Off
Suppresses comments and does not include the function signature in the function banner.
Recommended Settings
Application | Setting |
---|---|
Debugging | On |
Traceability | On |
Efficiency | No impact |
Safety precaution | No recommendation |
Programmatic Use
Parameter: MATLABSourceComments |
Type: character vector |
Value: 'on' | 'off' |
Default: 'off' |
Version History
Introduced in R2010b