MATLAB: Count

count

I have g(45×2)and I(45×2) i want to compare each and every row of g with I(45×2) and count them are equal

Best Answer

G = randi(3, 45, 2);
I = randi(3, 45, 2);
sum(all(G == I, 2))