Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Matrix manipulation Question - arranging rows

1 Ansicht (letzte 30 Tage)
Mohammad Mahmoud
Mohammad Mahmoud am 16 Nov. 2019
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
For example i have the following matrix
a = 1 y y y
4 x x x
2 z z z
3 h h h
where the letters are random numbers
how can i re-arrange the rows depending on the value on the first colomn from lowest to highest so the matrix becomes like this
a = 1 y y y
2 z z z
3 h h h
4 x x x
Thank you

Antworten (1)

the cyclist
the cyclist am 16 Nov. 2019
Bearbeitet: the cyclist am 16 Nov. 2019
sortrows(a,1)
See the documentation for sortrows for details.

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by