Hi, giving a matrix of size nx2
A=[ 222,186; 222,187; 223,187]
giving 2 values i= 222 and j=187 i want to find the index the row that contain i on the first column and j on the seond wich is 2 here i want something like
i thought to do somthing like this
for k=1:size(A,1) test=find(A(k,1)==i && A(k,2)==j) if (test==1) ind=k; break; end end
i need only the first index like i did here but i want to avoid the loop.
Thanks
Best Answer