Section: Bitwise Operations
y = bitxor(a,b)
where a
and b
are unsigned integer arrays. The xor
operation
is performed using 32 bit unsigned intermediates. Note that if a
or b
is a scalar, then each element of the other array is xored with
that scalar. Otherwise the two arrays must match in size.
--> bitxor([3 4 2 3 10 12],5) ans = 6 1 7 6 15 9
This is a nice trick to look for odd numbers
--> bitxor([3 4 2 3 10 12],1) ans = 2 5 3 2 11 13