Main Content

Data templates: Source file (*.c) template

Template for generated data source file

Model Configuration Pane: Code Generation / Templates


Specify the code generation template (CGT) file to use when generating a data source file.


ert_code_template.cgt (default) | CGT file

Default: ert_code_template.cgt

You can use a CGT file to define the top-level organization and formatting of generated data source files (.c or .cpp) that contain definitions of variables of global scope.


The CGT file must be located on the MATLAB® path.

Recommended Settings

DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Programmatic Use

Parameter: ERTDataSrcFileTemplate
Type: character vector
Value: valid CGT file
Default: 'ert_code_template.cgt'

Version History

Introduced before R2006a