Sorting cell array containing alphanumeric text

조회 수: 7 (최근 30일)
Sam Smith
Sam Smith 2018년 11월 30일
댓글: Sam Smith 2018년 11월 30일
I have a cell array, a column of which consists of alphanumeric text such as
3. Item 3
2. Item 4
5. Item 5
I want to sort the cell array so that that column is in ascending order according to the number: 1. Item 2; 2. Item 2; etc, and have the other columns sorted along with this.
  댓글 수: 1
Sam Smith
Sam Smith 2018년 11월 30일
I figured it out. It's just sortrows(A,columnnumber).

댓글을 달려면 로그인하십시오.

채택된 답변

madhan ravi
madhan ravi 2018년 11월 30일
sort(a) where a is your cell array

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by