I have a matrix A that as three columns A= [1 2 0.5555; 1 2 0.4555; 1 1 0.5555] I have a matrix B that is 7000×3 I want to find all the indx of B where the first row of A, A(1,:) resides.
I tried using ismember and it only returns the indx of the last row it finds in B.
[tf,indx]=ismember(A(1,:),B,'rows')
tf =
1
indx =
3212
I want all the indx rows not just the last. Everything I've read about ismember suggests that this should give me all the indx. Can you tell me what I'm doing wrong? or propose an alternate solution? By the way I'm running ver. R2009a.
Thanks, John.
Best Answer