I'm struggling a bit to sort several timetable according to their length. Can someone help me to get the right syntax?
I appreciate the input

 채택된 답변

Jan
Jan 2021년 3월 8일
편집: Jan 2021년 3월 9일

0 개 추천

Try this - I cannot check it, because I do not have your input data:
Len = cellfun(@height, C); % [EDITED] @length -> @height
[~, index] = sort(Len);
C = C(index);

댓글 수: 1

Lutetium
Lutetium 2021년 3월 8일
thanks, works perfectly! just had to replace length by height since its a timetable
I appreciate your help!

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

제품

태그

질문:

2021년 3월 8일

편집:

Jan
2021년 3월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by