Identifying ordinal position of an enumerated value
Show older comments
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 Comments
Fangjun Jiang
on 24 Oct 2011
use {}Code format next time.
Jim Johnson
on 24 Oct 2011
Jim Johnson
on 19 Jan 2012
Answers (0)
Categories
Find more on Stateflow in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!