メインコンテンツ

MATLAB のクラス

MATLAB® クラスのシミュレーションとコード生成

MATLAB Function ブロックでは、値クラス、ハンドル クラス、System object などの MATLAB クラスを使用できます。MATLAB の値クラスとハンドル クラスの詳細については、ハンドル クラスと値クラスの比較を参照してください。System object の詳細については、System object とはを参照してください。

MATLAB Function ブロックでクラスを使用するときは、使用上の特定の注意および制限に留意しなければなりません。

ブロック

MATLAB FunctionMATLAB コードを Simulink モデルに含める
MATLAB SystemSystem object をモデルに含める

トピック

トラブルシューティング

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.rref、または coder.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.