Structures - MATLAB & Simulink (original) (raw)

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.cstructname Name C structure type in generated code

Topics

Generate Code for Structure Arrays

Generate Code for Structure Arrays

Write a MATLAB function that uses structure arrays so that it is suitable for code generation.