how to sort only first column in matlab
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
abdul wahab aziz
am 27 Aug. 2016
Beantwortet: Star Strider
am 27 Aug. 2016
X=0.5 1.0;0.1 2;2.5 4 output must be like 0.1 2;0.5 1.0;2.5 4
0 Kommentare
Akzeptierte Antwort
Star Strider
am 27 Aug. 2016
Use the sortrows funciton:
X = [0.5 1.0;0.1 2;2.5 4];
Output = sortrows(X, 1)
Output =
0.1 2
0.5 1
2.5 4
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Shifting and Sorting Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!