I would like to get the array value of all of the items inside an enumeration in MATLAB? Is there any function allow me to do that?
Assuming that you're talking about a MATLAB Enumeration object (and not a java.lang.Enumeration), you can use the "enumeration" function to get a list of the enumeration members. From the MATLAB documentation, at http://www.mathworks.com/help/techdoc/ref/enumeration.html ,
m = enumeration(ClassName) returns the enumeration members for the class in the column vector m of objects.
m = enumeration(obj) returns the enumeration members for the class of object, obj, in the column vector m of objects
See also the excellent video tutorial at the MathWorks web site, at http://www.mathworks.com/videos/matlab/enumerations-in-r2010b.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With