Identifying ordinal position of an enumerated value
Ältere Kommentare anzeigen
is there a function, enum_ordinal for instance that returns an ordinal position of the enuerated value in the enumerated type?
classdef WeekDays
enumeration
Monday, Tuesday, Wednesday, Thursday, Friday
end
end
temp=enum_ordinal(Tuesday)
temp = 2
3 Kommentare
Fangjun Jiang
am 24 Okt. 2011
use {}Code format next time.
Jim Johnson
am 24 Okt. 2011
Jim Johnson
am 19 Jan. 2012
Antworten (0)
Kategorien
Mehr zu Stateflow finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!