Coordinate count in MATLAB

0

Hello. I have an 8x2 array:

M = [12; 58; 31; 6 6; 7 1; 12; 31; 7 1];

I would like to count how many times each line (x, y) repeats.

The result should be, for example, like this:

Attempt:

[i,j]=hist(M,unique(M)); out=[j' sum((i),2)]
    
asked by anonymous 03.08.2018 / 18:36

0 answers