Main Content

MATLAB Classes

Definition and use of MATLAB® classes, differences for code generation

To generate efficient standalone code for MATLAB classes, you must use classes differently than when running your code in the MATLAB environment.

Blocks

MATLAB FunctionInclude MATLAB code in Simulink models
MATLAB SystemInclude System object in model

Topics

Troubleshooting

Class Does Not Have Property

Troubleshoot issues with assignment of a property of a handle class.

Handle Object Limitations for Code Generation

Adhere to code generation restrictions for handle objects.

Passing By Reference Not Supported for Some Properties

You cannot use certain properties with coder.ref, coder.rref, or coder.wref.