How can i sort all the rows of a matrix but one along a row

1 回表示 (過去 30 日間)
Kalpha.mc
Kalpha.mc 2020 年 9 月 20 日
回答済み: David Hill 2020 年 9 月 20 日
How would i sort a 15 x 5 matrix descending based on the 5th column without changing the first column.

採用された回答

David Hill
David Hill 2020 年 9 月 20 日
b=[a(:,1),sortrows(a(:,2:end),4,'descend')];

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

タグ

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by