sorted two different arrays
조회 수: 1 (최근 30일)
이전 댓글 표시
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?
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!