Find smallest cell in cell array

3 次查看(过去 30 天)
Is there a way to find the smallest sized cell in a cell array?
Thanks!

采纳的回答

Walter Roberson
Walter Roberson 2012-4-19
What is "size" in this context? Number of rows? Number of columns? Number of elements? Storage requirement?
Which is smaller:
'fdoafodsif-0dsi0-0-dfs0-fds0--ds'
or
struct('foo',3,'bar',7)
?
  4 个评论
Philip
Philip 2012-4-19
That worked perfectly, thanks so much!
Jan
Jan 2012-4-19
Or slightly faster:
[minsize, minidx] = min(cellfun('size', YourCell, 2));

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by