Main Content


Definition and use of enumerated data for MATLAB Function blocks

Enumerations represent a fixed set of named values. Enumerations help make your MATLAB® code more readable. In a MATLAB Function block, enumeration classes must derive from Simulink.IntEnumType, int8, uint8, int16, uint16, or int32. If you use Simulink® Coder™ to generate C/C++ code, the enumeration class base type determines how the enumeration is represented in the generated code.


MATLAB FunctionInclude MATLAB code in Simulink models