sort elements of cell array

조회 수: 4 (최근 30일)
Tha saliem
Tha saliem 2017년 4월 11일
댓글: Tha saliem 2017년 4월 11일
hey i have a question that how to sort elements of cell array at once Like:
x{1,1}={2;1;3}
x{2,1}={4,2;1;3}
and result should be like this:
x{1,1}={1;2;3}; x{2,1}={1,2;3;4}

채택된 답변

KSSV
KSSV 2017년 4월 11일
x{1,1}=[2;1;3] ;
x{2,1}=[4;2;1;3] ;
iwant = cellfun(@sort,x,'un',0)
  댓글 수: 1
Tha saliem
Tha saliem 2017년 4월 11일
Thank you so much

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

추가 답변 (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