MATLAB allows you to work with .NET enumerations using features of the MATLAB enumeration class and some features unique to the .NET Framework.
Enumerations contain members, methods, and underlying values. Terms you should know:
Enumeration — In MATLAB, a class having a finite set of named instances. In the following
topics, the term
enumeration refers to a .NET enumeration.
Enumeration member — Named instance of an enumeration class.
Underlying value — Numeric value associated with an enumeration member.
The MATLAB language supports user-defined enumeration classes. If you are using enumerations defined in MATLAB, refer to the topics under the creating MATLAB classes Enumerations category.
|.NET enumeration object bit-wise NOT instance method|
Example source code.
This example uses the
You use an enumeration member in your code as an instance of an enumeration.
To get the descriptive name of an enumeration, use the
How to convert a .NET enumeration values.
This example shows how to display member names of the
With relational operators, you can use enumeration members in
switch statements and other functions that test for
This example shows how to combine members of an enumeration to create MATLAB variables.
This example how to use the Microsoft®
By default, MATLAB provides relational operators, conversion methods, and bitwise methods for a .NET enumeration.
MATLAB supports enumerations of any numeric type.
.NET features not supported in MATLAB.