Main Content

Data Definition

How defining data for code generation differs from defining data for MATLAB®

MATLAB variables can change their properties at run-time. The same variable can hold a value of any class, size, or complexity. Statically typed languages, such as C/C++, must determine variable types at compile-time.

Control how data is represented, memory is allocated, and which C types are used in generated code by how you design your MATLAB code. Follow the described guidelines to allow the code generator to determine the types of variables when generating code. Code generation allows reassignment of a variable to a value of different class, size, and property.