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,

/* '<S2>:1:22' xb1 = x-1; */
xb1 = x;
Selecting this parameter adds the MATLAB code 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

ApplicationSetting
DebuggingOn
TraceabilityOn
EfficiencyNo impact
Safety precaution

No recommendation

Programmatic Use

Parameter: MATLABSourceComments
Type: character vector
Value: 'on' | 'off'
Default: 'off'

Version History

Introduced in R2010b