operators-logical
Programming
Logical operators. && (short-circuit AND), || (short-circuit OR), ~ or ! (NOT). & and | are element-wise logical AND/OR for arrays. Nonzero values are treated as true.
Syntax
a && b
a || b
~a
a & b
a | b
Examples
See Also
Try SimLab — Free MATLAB® Alternative
466 functions. Runs in your browser. No install.
Open SimLab