MATLAB: How can i find a certain vector in a matrix

findvector

Hey there,
I have a 3×370 Matrix and I want to find a 3×1 vector within the matrix.
Output should be the Column number of the 3×1 vector in the matrix.
I´be really glad if someone can help me 🙂
Greets Lukas

Best Answer

Transpose and use ismember(A,B,'rows')
A=A';370x3
B=B';1x3
x=find(ismember(A,B,'rows'));%will give you the column numbers of A that match B