sort a line of the matrix and change the other lines according the line sorted
3 ビュー (過去 30 日間)
古いコメントを表示
Henrique Tinti de Andrade
2015 年 8 月 10 日
コメント済み: Henrique Tinti de Andrade
2015 年 8 月 10 日
Hello, i want to sort a line of the matrix and change the other lines according the line sorted. For example, i have a matrix like this:
a = [5 3 4 2 6; 1 2 3 4 5].
i want to sort line 1 and change line 2 according the sort of line 1, like this:
aSorted = [2 3 4 5 6; 4 2 3 5 1]
How can i do that??
Thank you for your help.
0 件のコメント
採用された回答
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Shifting and Sorting Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!