sorted two different arrays

조회 수: 1 (최근 30일)
Cem SARIKAYA
Cem SARIKAYA 2019년 5월 19일
댓글: Cem SARIKAYA 2019년 5월 19일
hello, I have two different variables one of them is table, one of them is cell with the same number of rows. I need to sort both of them with table 1st column how can ı do that?

채택된 답변

madhan ravi
madhan ravi 2019년 5월 19일
편집: madhan ravi 2019년 5월 19일
[~,idx]=sort(T{:,1}); % T your table
C(idx,:) % C your cell become sorted according to first column of table
T(idx,:) % T becomes sorted according to first column of its own
  댓글 수: 1
Cem SARIKAYA
Cem SARIKAYA 2019년 5월 19일
Thank you very 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