Package: matlab.lang
Represent on and off states with logical values
matlab.lang.OnOffSwitchState
is an enumeration
class that derives from the logical
class.
Use this class to implement 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.
off | Logical false |
on | Logical true |