You can generate code for MATLAB classes, including value classes, handle classes, and System objects. In the generated C code, MATLAB classes are represented as structures. If you generate C++ code, the default behavior of the code generator is to produce C++ classes for the MATLAB classes. You must be aware of certain usage notes and limitations when using classes in your MATLAB code that is intended for code generation.
|Represent set of MATLAB classes|
Use a value class in MATLAB code intended for code generation.
Use your System object™ in MATLAB code intended for code generation.
Generate a C++ class for a value class, handle class, or System object in your MATLAB code.
Use classes in MATLAB code intended for code generation.
Generate code for MATLAB value and handle classes and user-defined System objects.
Special considerations for using System objects in code generated from MATLAB.
Use a handle class destructor in MATLAB code intended for code generation.
Adhere to code generation restrictions for handle objects.
Troubleshoot issues with assignment of a property of a handle class.
You cannot use certain properties with
Troubleshoot generation of standalone code for C++ destructor of a MATLAB class.
Troubleshoot code generation failure for arrays of objects in your MATLAB code.