Azzera filtri
Azzera filtri

Sorting along column

2 visualizzazioni (ultimi 30 giorni)
Karthik KJ
Karthik KJ il 18 Giu 2012
Hi,
I have a matrix
a =
-5 30 120
-10 15 240
after sort(a) I am getting
-10 30 120
-5 15 240
But how can i get column 2 and column to align accordingly, means i need the output as
-10 15 240
-5 30 120
How can i get this ?

Risposta accettata

the cyclist
the cyclist il 18 Giu 2012
Use the sortrows() function.

Più risposte (0)

Categorie

Scopri di più su Shifting and Sorting Matrices in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by