I need to check which rows of a matrix A are inside another matrix B and if there are repeated rows from the matrix A, then identify the repeated ones and count how many repeated rows are found but for each different set of values. I have tried with ismember and unique functions but i don't know how to keep track of which are the repeated rows and count how many times thoserows are repeated.
A= [4 4; 2 3; 4 2; 3 3; 2 3; 1 3; 3 3]B=[1 1; 2 1; 3 1; 4 1; 1 2; 2 2; 3 2; 4 2; 1 3; 2 3; 3 3; 4 3; 1 4; 2 4; 3 4; 4 4]
Best Answer