Performs the logical XOR (exclusive OR) of two expressions.
XOR(val1, val2)
val1 |
- |
A scalar, series, or table. |
val2 |
- |
A scalar, series, or table. |
A real, series, or table.
xor(W1, W2)
returns a series or table with zeros at points where both W1 and W2 are zero and non-zero, and ones at points where either W1 or W2 is zero, but not both.
xor({0, 1, 5, 7}, 1)
returns a series {1, 0, 0, 0}.
W1: {1, 2, 3, 4, 5}
W2: {0, 2, 0, -3, 1}
W3: xor(W1, W2)
Window 3 contains the series {1, 0, 1, 0, 0}.
See |^ to perform a bitwise XOR function.
< <= > >= == != (Conditional Operators)
&& || ! AND OR NOT XOR (Logical Operators)