필터 지우기
필터 지우기

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