I would like to sort first 3 rows of a matrix A with column 2 and then next 3 rows without changing the first three rows again with column 2. eg, A = [1 6 50; 5 2 50; 7 1 50; 2 5 53; 5 1 53; 7 3 53] Later, with same logic, I would like to sort a matrix with 100 rows.
MATLAB: Sorting specific rows with a specific column
sort
Best Answer