Main Content

本页的翻译已过时。点击此处可查看最新英文版本。

数据定义基础知识

如何为代码生成定义数据、变量和函数

函数

half构造半精度数值对象

示例和操作指南

Eliminate Redundant Copies of Variables in Generated Code

Use coder.nullcopy to indicate that the code generator can allocate memory without initializing it.

Reuse the Same Variable with Different Properties

Reuse a variable with different properties when the code generator can determine the properties of each occurrence of the variable.

概念

Data Definition for Code Generation

Define data in MATLAB® code intended for code generation.

Variables Definition for Code Generation

Define the class, size, and complexity of variables in MATLAB source code before using them.

为 C/C++ 代码生成定义变量的最佳做法

遵循在用于代码生成的 MATLAB 代码中定义变量的规范。

Edit and Represent Coder Type Objects and Properties

Command line representation of coder type objects.

Reassignment of Variable Properties

Reassign a variable with a value of different class, size, or complexity.

复数数据的代码生成

在用于代码生成的 MATLAB 代码中使用复数数据。

Code Generation for Sparse Matrices

Use sparse matrices in MATLAB code intended for code generation.

Code Generation for Constants in Structures and Arrays

Sometimes the code generator does not recognize constant structure fields or array elements.

Array Size Restrictions for Code Generation

The code generator and the target hardware constrain the maximum number of elements of an array.

特色示例