I have a .csv file called "SORT.csv" (attached). I imported SORT.csv to MATLAB as a 128×5 matrix (the 5 columns being ID, T, N, P, D).
The "ID" columns contains numbers like 762035, 325, 45, 221, 53 etc.
I would like to sort the matrix based on the first digit of the numbers in the "ID" column. In other words, I would like my SORT matrix to have rows in the following order (based on the examples given above):
- 221
- 325
- 45
- 53
- 762035
Would someone be able to help me accomplish that?
Best Answer