level = PPM.High;When you substitute enumeration members for instances of the superclass, MATLAB
coerces the enumeration member to the superclass. For example, add an enumeration
member of the PPM class with a numeric valueslevelNew = level + 100levelNew =1100The result is of class double.whosName Size Bytes Class Attributeslevel 1x1 108 PPM
levelNew 1x1 8 doubleYou can substitute superclass values for enumeration members when the values
correspond. For example, pass one of the numeric values defined in the enumeration class
to the PPMSwitch function.function PPMSwitch(ppm)
switch ppm
case PPM.Low
disp Low
case PPM.Medium
disp Medium
case PPM.High
disp High
end
endPPMSwitch(100)MediumYou can also use an enumeration member directly:PPMSwitch(PPM.Medium)Medium14 Enumerations