MATLAB: How to check if points in an array are duplicates

arraycell arraysrandom number generator

I am generating random values for rows and columns within a specified range. I put the rows and columns in an array like this: points =
1 2
1 2
1 1
2 2
so row 1 of the points array means row 1, column 2.
I need to check if any of the points are duplicates.The points array above has two duplicates. How do I do this?

Best Answer

C = unique(A,'rows') ;
Read about unique