matlab.lang.OnOffSwitchState Class
Namespace: matlab.lang
Represent on and off states with logical values
Description
matlab.lang.OnOffSwitchState
is an enumeration class that derives
from the logical
class. Use this class to
specify the data type of properties that accept values of 'on'
and
'off'
and logical true
,
false
, 1
, or 0
.
Use this class to constrain property values to any of these values:
Class | Logical True | Logical False |
---|---|---|
Character vector |
|
|
String scalar |
|
|
Logical |
|
|
Logical and numeric |
|
|
Enumeration member |
|
|
Because OnOffSwitchState
derives from the logical
class,
you can use these enumeration members in logical expressions.
Enumeration Members
off | Logical false |
on | Logical true |