Generate an example main program - Control generation of example main program - MATLAB (original) (raw)

Main Content

Control generation of example main program

Model Configuration Pane: Code Generation / Templates

Description

Control whether to generate an example main program for model. This parameter is not relevant and is disabled for component models configured with a service interface.

Dependencies

This parameter enables Target operating system.

Settings

on (default) | off

Default: on

On

Generates an example main program, ert_main.c (or .cpp) for a model. The file includes:

The operation of the main program and the scheduling algorithm employed depend primarily on whether the model:

Off

Does not generate an example main program.

Note

The software provides static versions of the main file, _`matlabroot`_/rtw/c/src/common/[rt_main.c](https://mdsite.deno.dev/matlab:edit%28fullfile%28matlabroot,'/rtw/c/src/common/rt%5Fmain.c'%29%29) and _`matlabroot`_/rtw/c/src/common/[rt_cppclass_main.cpp](https://mdsite.deno.dev/matlab:edit%28fullfile%28matlabroot,'/rtw/c/src/common/rt%5Fcppclass%5Fmain.cpp'%29%29), as a basis for custom modifications. You can use the static main file as a template for developing embedded applications.

Tips

Application Setting
Debugging No impact
Traceability No impact
Efficiency No impact
Safety precaution No impact

Programmatic Use

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

Version History

Introduced before R2006a