I am looking for a function to find the most repeated (i.e. modal) rows of a matrix in MATLAB. Sort of:
>> A = [0, 1; 2, 3; 0, 1; 3, 4]
A =
0 1
2 3
0 1
3 4
Then runs:
>> mode(A, 'rows')
will return [0, 1], ideally, the second output giving the indices where this row occurred (i.e [1, 3]'..)
Does anyone know about such a feature?
source
share