trying to use ismember to find a row in a large matrix
Show older comments
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 7000x3 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.
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!