主要内容

MATLAB

MATLAB® 类的定点转换和代码加速

您可以在用于算法加速或定点转换的代码中使用 MATLAB 类,包括值类、句柄类和 System object。要了解有关 MATLAB 中值和句柄类的更多信息,请参阅句柄类和值类的比较。要了解有关 System object 的更多信息,请参阅何谓 System object?

在用于定点转换或加速的 MATLAB 代码中,您可以:

  • 在 MATLAB 代码中使用 MATLAB 值或句柄类。

  • 使用 MATLAB 值类作为 MATLAB 入口函数的输入参量。

在用于算法加速或者定点转换的 MATLAB 代码中使用类时,您必须了解一些特定的使用说明和限制。

coder.ClassTypeRepresent set of MATLAB classes acceptable for input specification

主题

疑难解答

Resolve Error: Handle Object Referenced by Persistent Variable (MATLAB Coder)

Troubleshoot error when using a persistent handle object.

Resolve Error: Nontunable Property Cannot Be Defined by Subscripted Assignment (MATLAB Coder)

Troubleshoot code generation failure when a System object uses a structure.

Resolve Error: Class Properties Must Be Fully Defined Before Use (MATLAB Coder)

Troubleshoot code generation error when class properties are not defined before use.

Resolve Error: Cannot Reference Handle Object Outside of Loop (MATLAB Coder)

Troubleshoot error when creating or allocating a handle object inside a for-loop.

类没有属性 (MATLAB Coder)

句柄类的属性赋值问题故障排除。

某些属性不支持按引用传递 (MATLAB Coder)

某些属性无法与 coder.refcoder.rrefcoder.wref 结合使用。

Resolve Error: coder.varsize Not Supported for Class Properties (MATLAB Coder)

Troubleshoot code generation error when using coder.varsize with properties of a MATLAB class.