Main Content

本页对应的英文页面已更新,但尚未翻译。 若要查看最新内容,请点击此处访问英文页面。

结构体

结构体的代码生成

函数

coder.cstructnameName C structure type in generated code

主题

用于代码生成的结构体定义

在用于进行代码生成的 MATLAB® 代码中使用结构体。

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 the C Structure Type to Use With a Global Structure Variable

Use coder.cstructname to define a type object for a global structure.

特色示例