I want to delete the repeat data in the flowing. Then ascending order according to the first column. Could you show the detail code to solve this problem? thank you very much.
15.0 0.8 1.6 -0.0 -0.3
16.0 2.4 -0.2 0.1 -0.1
17.0 2.6 -0.6 0.2 0.2
18.0 4.6 1.0 0.3 0.1
19.0 2.3 1.4 0.9 0.2
20.0 2.4 0.9 0.5 0.4
6.0 5.8 2.5 -1.8 -1.9
7.0 4.1 4.1 -0.8 1.6
8.0 2.8 2.3 2.2 -0.5
9.0 -1.5 -1.9 1.1 0.9
10.0 0.9 0.2 0.0 0.1
9.0 -1.5 -1.9 1.1 0.9
10.0 0.9 0.2 0.0 0.1
11.0 2.3 -3.6 0.7 -0.6
12.0 -1.2 -0.4 -0.2 -0.1
13.0 -4.4 0.3 -0.3 -0.2
14.0 -0.9 0.9 -0.4 -0.4
15.0 0.8 1.6 -0.0 -0.3
From the documentation of
unique, we find that theunique(B, 'rows')command willSo:
will solve both your problems: the default for
sortis to sort down the first column.