When you call theenumerationfunction with no output arguments, MATLAB displays only the first name for each enumeration member (as specified in the class definition). To see all available enumeration members and their names, use the two output arguments. For example,[m,s] = enumeration(obj);....
The clibgen.EnumDefinition class contains the MATLAB definition for an enumeration defined in the C++ header.
When creating label definitions by using a labelDefinitionCreator or labelDefinitionCreatorMultisignal (Automated Driving Toolbox) object, use these enumerations to create attributes of specific types. Creation Syntax attributeType('Numeric') attributeType('String') attributeType('Logical') attributeType(...
Enumeration type name:Specify an enumerated type name to search for in a Simulink model. This option also supports the computed property expressions of the form%<enumTypeName>, whereenumTypeNameis an enumeration type name that is evaluated to a string. ...
Results in a call tologicalthat is equivalent to the following statement in a constructor: functionobj = Bool(val) obj@logical(val)end MATLAB passes the member argument only to the first superclass. For example, supposeBoolderived from another class: ...
conversion to character array or string y = char(LEDcolor.RED); y1 = cast(LEDcolor.RED,'char'); y2 = string(LEDcolor.RED); You can convert only compile-time scalar valued enumerations. For example, this code runs in MATLAB, but produces an error in code generation: ...
When you call theenumerationfunction with no output arguments, MATLAB displays only the first name for each enumeration member (as specified in the class definition). To see all available enumeration members and their names, use the two output arguments. For example,[m,s] = enumeration(obj);....
[m,s] = enumeration('matlab.lang.OnOffSwitchState') m = 2x1 OnOffSwitchState enumeration array off on s =2x1 cell{'off'} {'on' } Input Arguments collapse all ClassName—Enumeration class name character vector|string Enumeration class name, specified as a character vector or string scalar....
When you call theenumerationfunction with no output arguments, MATLAB displays only the first name for each enumeration member (as specified in the class definition). To see all available enumeration members and their names, use the two output arguments. For example,[m,s] = enumeration(obj);....
[m,s] = enumeration('matlab.lang.OnOffSwitchState') m = 2x1 OnOffSwitchState enumeration array off on s = 2x1 cell {'off'} {'on' } Input Arguments collapse all ClassName— Enumeration class name character vector | string Enumeration class name, specified as a character vector or string...