MATLAB: Find row and column in 10 by 2 matrix that contain a particular row element

finding indexesmaskingMATLAB

i have a matrix of 20 by 2
data=[3 3;4 4;5 3;6 2;12 3;8 7;8 9;10 10;4 14;12 14;-5 2;-4 4;-6 2;-10 2;-5 5;-5 10;-5 12;-12 4;-9 10;-9 8]
and i want row and column which contaion [6 2]. How i can do that.
thank u

Best Answer

rows = ( data(:,1)==6 & data(:,2)==2 )