xor Syntax xor(X, Y) Arguments X and Y can be a scalar, pair, vector or matrix. Details Pair each elements in X and Y to perform the "exclusive or" operation. Examples 1 xor 0 // output: 1 x = 5 6 7 x xor 0 // output: [1,1,1] x = 1 2 3 y = 2 1 3 x xor y // output: [0,0,0] true xor false // output: 1 Related function: or, not
Examples 1 xor 0 // output: 1 x = 5 6 7 x xor 0 // output: [1,1,1] x = 1 2 3 y = 2 1 3 x xor y // output: [0,0,0] true xor false // output: 1 Related function: or, not