Strutture
MATLAB® Coder™ supporta la generazione di codice per le strutture con una serie di restrizioni sulle operazioni, sulle proprietà dei valori delle strutture scalari e sugli array di strutture. È possibile generare codice per strutture scalari così come per array di strutture. Attenersi alle restrizioni per l'indicizzazione e l'assegnazione di valori alle sottostrutture e ai campi. Gli argomenti della struttura vengono passati per riferimento o per valore nel codice generato.
Funzioni
coder.cstructname | Name C structure type in generated code |
Argomenti
- Structure Definition for Code Generation
Use structures in MATLAB code intended for code generation.
- Structure Operations Allowed for Code Generation
Use structure operations that code generation supports.
- Define Scalar Structures for Code Generation
Adhere to code generation restrictions for scalar structures.
- Define Arrays of Structures for Code Generation
Adhere to code generation restrictions for arrays of structures.
- Index Substructures and Fields
Adhere to code generation restrictions for indexing substructures and fields.
- Assign Values to Structures and Fields
Adhere to code generation restrictions for assigning values to structures and fields.
- Pass Structure Arguments by Reference or by Value in Generated Code
Control whether structure arguments are passed by reference or by value.
- Name C Structure Type to Use with Global Structure Variable
Use
coder.cstructnameto define a type object for a global structure.
