フィルターのクリア

how to sort only first column in matlab

2 ビュー (過去 30 日間)
abdul wahab  aziz
abdul wahab aziz 2016 年 8 月 27 日
回答済み: Star Strider 2016 年 8 月 27 日
X=0.5 1.0;0.1 2;2.5 4 output must be like 0.1 2;0.5 1.0;2.5 4

採用された回答

Star Strider
Star Strider 2016 年 8 月 27 日
Use the sortrows funciton:
X = [0.5 1.0;0.1 2;2.5 4];
Output = sortrows(X, 1)
Output =
0.1 2
0.5 1
2.5 4

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by