I have this big matrix, 592x528x903 single, called X. I want to see if the X(:,:,1) is not equal to any other in the matrix. I use this code:
b=2;while b < 902 if X(:,:,1) ~= X(:,:,b) b end b=b+1;enddisp done
I get nothing on the screen, except done, so first I thought they all where equal. The problem is that if i use "equal to", i get the same response, nothing on the screen.
b=2;while b < 902 if X(:,:,1) == X(:,:,b) b end b=b+1;enddisp done
Something is not working, they can't be both equal and not equal at the same time, or am I wrong?
Best Answer