MATLAB Classes Definition for Code Generation - MATLAB & Simulink (original) (raw)

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

Language Limitations

Although code generation support is provided for common features of classes such as properties and methods, there are a number of advanced features which are not supported, such as:

Code Generation Features Not Compatible with Classes

Defining Class Properties for Code Generation

For code generation, you must define class properties differently than you do when running your code in the MATLAB environment:

Inheritance from Built-In MATLAB Classes Not Supported

You cannot generate code for classes that inherit from built-in MATLAB classes. For example, you cannot generate code for the following class:

classdef myclass < double

An exception to this rule is the MATLAB enumeration class. You can generate code for enumeration classes that inherit from built-in MATLAB classes. See Code Generation for Enumerations.

See Also

coder.target