Documentation

Data, Function, and File Definition

Control of model data and elements in generated code

The code that you generate from a model contains functions and variables that correspond to the systems, signals, and block parameters in the model diagram. To tune parameters and monitor signals and states during code execution, and to ease the integration of the generated code with your own code, you can control the declarations and definitions of functions and variables. You can specify:

  • Identifiers

  • Parameter tunability

  • Placement in generated or imported files

  • Data types

The generated code contains multiple entry-point functions that allow you to:

  • Create modular code that contains reusable reentrant functions.

  • Schedule model execution and data initialization on your target hardware.

Featured Examples