Reputation: 11
I have a vector A=[1 2 3] and I have a matrix B=[5 6 8,1 2 3, 9 6 5]. How can I find the row indexes? I tried find but it didn't work
Upvotes: 0
Views: 273
Reputation: 310
You can use the ismember function for a one-line solution to that question.
The usage will be like this:
[tf, index]=ismember(A,B,'rows');
Upvotes: 2