model_initialize
Generated C/C++ entry-point function that contains initialization code for a Simulink model
Description
is a generated C or C++ entry-point function called one time to execute the initialization
code for a Simulink® model. This function is not intended to reset the real-time model data
structure (rtM) for a model.void
model_initialize(void
)
The generated calling interface of the initialize entry-point function for a model differs depending on the Language and Code interface packaging parameters. For more information, see Code interface packaging.
To preview and customize the name of a generated C initialize entry-point function an Embedded Coder® license is required. To preview the function, open the Code Mappings editor and click the Functions tab. To customize the function name, in the Function Name column click and edit the spreadsheet directly. To customize the function using a template, in the Function Customization Template column select a template to apply to the function. For more information, see Configure Names for Individual C Entry-Point Functions, and Configure Default Code Generation for Functions.
To view the generated initialize entry-point function, open the Code view or Code Generation Report and examine the source code for your model. For more information see, Analyze Generated Data Code Interface Report.
Note
Do not confuse model_initialize
with other initialization
functions that might be generated for referenced models, such as model_Init
.
Those initialization functions do not appear in the Code Mappings editor and are not
customizable.
Examples
Input Arguments
Output Arguments
Version History
Introduced before R2006a