How to sort a matrix ?

14 ビュー (過去 30 日間)
Sourav Kumar Sahu
Sourav Kumar Sahu 2021 年 1 月 31 日
コメント済み: Sourav Kumar Sahu 2021 年 2 月 17 日
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 件のコメント
Ive J
Ive J 2021 年 1 月 31 日
Sourav Kumar Sahu
Sourav Kumar Sahu 2021 年 2 月 17 日
it worked thank you

サインインしてコメントする。

回答 (1 件)

Star Strider
Star Strider 2021 年 1 月 31 日
The sortrows function can likely do what you want.

カテゴリ

Help Center および File ExchangeShifting and Sorting Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by