Main Content

Data Representation in Generated Code

R2026b
Customize data representation to ease integration with external code and support interactivity and instrumentation

Signals, states, and block parameters that you create in a model appear in the generated code as variables. Control the way that the code declares and defines these variables.

  • Generate efficient code by reducing memory usage and specifying numeric data types. Control the naming, definition, and usage of data types.

  • Ease the integration of the generated code with your own code by specifying identifiers and file placement of declarations and definitions.

  • Manage access to signal data and specify parameter tunability.

  • Package signal and parameter data into structures.

  • Improve code readability and traceability.

Topics

Storage in the Generated Code

Array Layout

Variable-Size Data

Named and Custom Data Types

Featured Examples