enumeration
Get enumeration of a classdef or an object
Syntax
enumeration(classdef) enumeration(object) enums = enumeration(classdef) enums = enumeration(object)
Arguments
- classdef
Classdef from which we want to retrieve the enumeration
- object
Object from which we want to retrieve the enumeration
- enums
a string matrix of enumeration
Ifenumeration
is called without output argument, the function only print list of enumeration.
Examples
classdef enum properties value = 0 end methods function enum(val) arguments val = 0; end this.value = val; end end enumeration ONE(1) TWO(2) THREE(3) FOUR(4) end end enumeration(enum) l = enumeration(enum) e = enum(); enumeration(e) l = enumeration(e)
See also
- classdef — Classdef and objects
- methods — Get accessible methods of a classdef or an object
- properties — Get accessible properties of a classdef or an object
History
Version | Description |
2026.0.0 | enumeration introduction. |
Report an issue | ||
<< clearglobal | Variables | exists >> |