Serves as logical operators.
val1 op val2
OPERATOR(val1, val2)
val1 |
- |
A scalar, series, or table. |
val2 |
- |
A scalar, series, or table. |
A scalar, series, or table containing ones and zeros (True or False).
W1: {0, 4, 9, 1, 2, 5}
W2: {1, 4, 0, 9, 3, 6}
W1 && (W2 > 3)
returns the series {0, 1, 0, 1, 0, 1} containing ones wherever W1 and W2>3 are non-zero, and zeros elsewhere.
W1 || (W2 == 4)
returns a series {0, 1, 1, 1, 1, 1} containing ones wherever W1 is non-zero or wherever W2 equals 4, and zeros elsewhere.
The returned series of ones and zeros is called a "Binary Series" and is useful for identifying points that meet a given condition.
The following logical operators are supported:
Operator |
Function |
Description |
&& |
AND |
logical and |
|| |
OR |
logical or |
! |
NOT |
logical not |
|
XOR |
logical exclusive or |
< <= > >= == != (Conditional Operators)