Main Content

Custom comments function

Specify a file that contains comments for MPT signal and parameter data objects

Model Configuration Pane: Code Generation / Comments


Specify a file that contains comments to be included in generated code for module packing tool (MPT) signal and parameter data objects. MPT data objects are objects of the classes mpt.Parameter and mpt.Signal.


  • This parameter only appears for ERT-based targets.

  • This parameter requires an Embedded Coder® license when generating code.

  • Custom comments (MPT objects only) enables this parameter.


'' (default) | string

Enter the name of the MATLAB® language file or TLC file for the function that includes the comments to be inserted of your MPT signal and parameter objects. You can specify the file name directly or click Browse and search for a file.


You might use this option to insert comments that document some or all of the property values of an object.

For an example MATLAB function, open the CustomCodeComments model and navigate to the Custom comments function configuration parameter:


Recommended Settings

DebuggingValid file name
TraceabilityValid file name
Safety precautionNoimpact

Programmatic Use

Parameter: CustomCommentsFcn
Type: character vector
Value: valid file name
Default: ''

Version History

Introduced before R2006a