我想获取MATLAB中枚举中所有项的数组值?是否允许我这样做?
答案 0 :(得分:5)
假设您正在讨论MATLAB枚举对象(而不是java.lang.Enumeration),您可以使用“枚举”函数来获取枚举成员的列表。从MATLAB文档中,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
另请参阅MathWorks网站http://www.mathworks.com/videos/matlab/enumerations-in-r2010b.html
上的优秀视频教程