I have data in array form with big number of rows and 12 columns. One of the column has an increasing array but not in a stable way (e.g. 1 1 1 1 1 2 2 2 2 3 3 4 4 4 4 4 4 4 4 5 6 6 6 etc)I want to organize data so I have all rows with 1 repetition of the value, 2 repetitions and so forth without disrupting the order of the sequence between each number. So I want to have an array that in the beginning was like this:
[1 45 67][1 23 89] [1 90 110][2 41 52][2 51 76][2 77 88][2 13 14][3 545 111][3 242 53][3 80 23][4 11 22][4 14 26][4 16 77][4 11 943]
and I want it to be like that:
[1 45 67][1 23 89] [1 90 110][3 545 111][3 242 53][3 80 23]
and
[2 41 52][2 51 76][2 77 88][2 13 14][4 11 22][4 14 26][4 16 77][4 11 943].
The data is all numerical and all rows have values in all columns.
Is there a way to do this with MATLAB?
Thank you very much.
Best Answer