Main Content

Structures

Code generation for structures

MATLAB® Coder™ supports code generation for structures with a set of restrictions on the operations, the properties of values of scalar structures, and the structure arrays. You can generate code for scalar structures as well as structure arrays. Adhere to restrictions for indexing and assigning values to substructures and fields. Structure arguments are passed by reference or by value in generated code.

Functions

coder.cstructnameName generated or externally defined structure type in C or C++ code

Topics

Troubleshooting

Resolve Error: Variables Must Be Fully Defined Before Use

Troubleshoot code generation error when variables are not defined before use.