Main Content

Additional code

Include custom code in the generated model source file

Model Configuration Pane: Code Generation / Custom Code


Specify custom code to include near the top of the generated model source file.


'' (default) | string

The code generator places code near the top of the generated model.c or model.cpp file, outside of any function.

Recommended Settings

DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Programmatic Use

Parameter: CustomSourceCode
Type: character vector
Value: C code
Default: ''

Version History

Introduced before R2006a