Find smallest cell in cell array

10 ビュー (過去 30 日間)
Philip
Philip 2012 年 4 月 19 日
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 Center および File ExchangeMatrices and Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by