Sort in ascending order for first column then descending order for the second column.
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Sososasa
el 29 de Mzo. de 2014
Comentada: Sososasa
el 29 de Mzo. de 2014
Hi,
A=[1 1 1;
3 2 1;
1 3 1]
is there a way in matlab to sort rows of a matrix based on ascending order for the first column and then descending order for the second column, so the final matrix will look like this:
A=[1 3 1;
1 1 1;
3 2 1]
0 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Shifting and Sorting Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!