フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

how do i sort a single row in terms of descending terms

2 ビュー (過去 30 日間)
selborne
selborne 2013 年 4 月 20 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
i was given an excel file with 5 row and 5 columns and i need to sort the first column in terms of descending terms, i managed to successfully open the excel file on matlab
  1 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 4 月 20 日
Do you want to import the data ?

回答 (2 件)

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 4 月 20 日
[a,b,c]=xlsread('yourfile.xls')
out=sortrows(c,-1)

Matthias
Matthias 2013 年 4 月 20 日
編集済み: Matthias 2013 年 4 月 20 日
If you only want to sort the first column have a look at
B = sort(A,dim)
If you want to sort the whole matrix according to the first column use
B = sortrows(A,-1)

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by