It works for me.
A=[1 0;1 0];
B=[1 1;0 0];
xor(A,B)
ans =
0 1
1 0
Yet when I try this...
XOR(A,B)
??? Undefined function or method 'XOR' for input arguments of type 'double'.
See the difference. Leave caps off to fix the problem.
I think the ambiguity arises because of a MathWorks convention used in their documentation. When they show the name of a function in their help, they use all caps. For example, here is the help for xor.
>> help xor
XOR Logical EXCLUSIVE OR.
XOR(S,T) is the logical symmetric difference of elements S and T.
The result is logical 1 (TRUE) where either S or T, but not both, is
nonzero. The result is logical 0 (FALSE) where S and T are both zero
or nonzero. S and T must have the same dimensions (or one can be a
scalar).
Even so, when you use the function, you do so with lower case letters in the function name.