Sort tables within a cell by size

3 次查看(过去 30 天)
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
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 个)

类别

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