I have two matrices: A=[1,2,3,4,5]
and B=[1,2,3,4,6]
. I need to compare elements of those matrix, and as a result I need to have binary matrix
Result=[1,1,1,1,0]
, that means if A(i)==B(i)
then Result(i)=1
else Result(i)=0
.
I have tried with:
if (isequal (A,B))
Result=1
else
Result=0
end
I have tried: Result=sign(A,B)
I hope that you could help me please?