(^8) To create this enumeration and the associated class, click Insert.
9 In the MATLAB Editor, an additional class file with the enumeration definition is
created. Save the enumeration class definition file as TemperatureUnitValues.m.
classdef TemperatureUnitValues < int32
enumeration
Fahrenheit (0)
Celsius (1)
Kelvin (2)
end
end
In the System object class definition, the following code was added:
properties(Nontunable)
TemperatureUnit (1, 1) TemperatureUnitValues = TemperatureUnitValues.Fahrenheit
end
For more information on enumerations, see “Limit Property Values to Finite List” on page
34-38.
34 System object Usage and Authoring
やまだぃちぅ
(やまだぃちぅ)
#1