This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Describe enumeration member of MATLAB class


The meta.EnumeratedValue class contains information about enumeration members defined by MATLAB® classes. The properties of a meta.EnumeratedValue object correspond to the attributes of the enumeration member being described.

All meta.EnumeratedValue properties are read-only. Query the meta.EnumeratedValue object to obtain information about the enumeration member it describes.

Obtain a meta.EnumeratedValue object from the EnumerationMemberList property of the meta.class object. EnumerationMemberList is an array of Meta.EnumeratedValue instances, one per enumeration member.

The meta.EnumeratedValue class is a subclass of the handle class.


To access the meta.EnumeratedValue objects for a class, first create a meta.class object for that class. For example, give the following OnOff class definition:

classdef OnOff < logical
      On (true)
      Off (false)

Obtain a meta.EnumeratedValue object from the EnumerationMemberList property of the meta.class object:

% Obtain the meta.class instance for the OnOff class
mc = ?OnOff;
% Get the array of EnumerateValue objects
enumList = mc.EnumerationMemberList; 
% Access the Name property of the first object in the array
enumList(1).Name =
ans =


Name read-onlyName of the enumeration member associated with this meta.EnumeratedValue object
Description read-only

Currently not used.

DetailedDescription read-only

Currently not used.


See the handle superclass for inherited methods.


See the handle superclass for inherited events.

Was this topic helpful?