How to sort a matrix ?

14 Ansichten (letzte 30 Tage)
Sourav Kumar Sahu
Sourav Kumar Sahu am 31 Jan. 2021
I have a input matrix 'a', a=[10 0.9; 3 0.98; 16 0.6; 1 0.4]. The sorted matrix(output matrix) should be [1 0.4 ;3 0.98;10 0.9 ;16 0.6]. Can anybody help in getting the required results.
  2 Kommentare
Ive J
Ive J am 31 Jan. 2021
Sourav Kumar Sahu
Sourav Kumar Sahu am 17 Feb. 2021
it worked thank you

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Star Strider
Star Strider am 31 Jan. 2021
The sortrows function can likely do what you want.

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!

Translated by