About Enumerated Data Types
Enumerated data is data that is restricted
to a finite set of values. An enumerated data type is
a MATLAB class that defines a set of enumerated values.
Each enumerated value consists of an enumerated name and
an underlying integer which the software uses
internally and in generated code. The following is a MATLAB class
definition for an enumerated data type named BasicColors,
which is used in all examples in this section.
classdef(Enumeration) BasicColors < Simulink.IntEnumType
enumeration
Red(0)
Yellow(1)
Blue(2)
end
endFor information about enumerated data types and their use in Simulink models,
see Using Enumerated Data in
the Simulink documentation. For information about enumerated
data types in Stateflow charts, see Using Enumerated Data in Stateflow Charts.
 | Enumerated Data Type Considerations | | Default Code for an Enumerated Data Type |  |
Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
Get this Simulink Kit