Given a matrix A, say
0 0 20
0 5 10
4 9 4
0 0 0
and a vector
a =[0 0 0 0]
How to determine a is 4-th row in A?
A quick matlab code looks like
find(ismember(A,a,’rows’))
Here is another solution which is harder to understand
e = A-repmat(a, [size(A, 1), 1]);
i = find(sum(e==0, 2)==size(A, 2));
Advertisement