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 日
doc sort
Sourav Kumar Sahu
Sourav Kumar Sahu 2021 年 2 月 17 日
it worked thank you

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

回答 (1 件)

Star Strider
Star Strider 2021 年 1 月 31 日

0 投票

The sortrows function can likely do what you want.

カテゴリ

ヘルプ センター および File Exchange で Shifting and Sorting Matrices についてさらに検索

質問済み:

2021 年 1 月 31 日

コメント済み:

2021 年 2 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by