フィルターのクリア

Info

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

Sorting an array in matlab

1 回表示 (過去 30 日間)
Kenneth Morley
Kenneth Morley 2014 年 1 月 11 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hello all:
I am trying to sort an array by the names of counties but I am struggling on how to do this. I have attached a picture of what the array looks like. Thanks for your help!

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 1 月 11 日
編集済み: Azzi Abdelmalek 2014 年 1 月 11 日
col=7
out=sortrows(A,col)
Example
A={1 'A' 'Baldwin';2 'B' 'Walton';3 'C' 'Jackson'}
col=3
out=sortrows(A,col)
  2 件のコメント
Kenneth Morley
Kenneth Morley 2014 年 1 月 11 日
Thank you for your answer! However, I get the "too many input arguments error"
Azzi Abdelmalek
Azzi Abdelmalek 2014 年 1 月 11 日
Post a sample of your data ( 5 rows)

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by