Main Content

Enumerations

Definition and use of enumerated data forMATLAB Functionblocks

Enumerations represent a fixed set of named values. Enumerations help make your MATLAB®code more readable. In aMATLAB Functionblock, enumeration classes must derive fromSimulink.IntEnumType,int8,uint8,int16,uint16, orint32. If you use金宝app®Coder™to generate C/C++ code, the enumeration class base type determines how the enumeration is represented in the generated code.

Blocks

MATLAB Function IncludeMATLABcode in models that generate embeddable C code

Topics