Hi,
I have:
A = [1 2 3 4; 1 2 3 4; 5 6 1 2]B = [1 2][~, index] = intersect(A(:,1:2),B(1,:),'rows')
The result I get is:
index = 2
Why is that while I actually have 2 rows in A equal to B
Why I don't get index = 1 and 2
intersectmatrix
A = [1 2 3 4; 1 2 3 4; 5 6 1 2]B = [1 2][~, index] = intersect(A(:,1:2),B(1,:),'rows')
index = 2
Best Answer