Enumerations
Code generation for enumerations
Enumerations represent a fixed set of named values. Enumerations help make your MATLAB® code and generated C/C++ code more readable. For code generation, enumeration classes must derive from built-in integer types. The base type determines how the enumeration is represented in the generated code.
Topics
- Code Generation for Enumerations
Use enumerations in MATLAB code intended for code generation.
- Generate Code for an LED Control Function That Uses Enumerated Types
Generate code for a MATLAB function that uses enumerations.
- Customize Enumerated Types in Generated Code
Specify a default enumerated value, use an externally defined enumerated type, and control enumerated type value names.