How to find the largest length of a cell array?
40 ビュー (過去 30 日間)
古いコメントを表示
Hi,
How can I find out the largest size of a cell array element?
For example, this f array contains many doubles within it and I want to find out the largest array size of f. (which is, I know, 500315). But don't know how to find it out.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1345149/image.png)
0 件のコメント
採用された回答
Walter Roberson
2023 年 4 月 4 日
max(cellfun(@length, YourCell))
2 件のコメント
Walter Roberson
2023 年 4 月 4 日
use the two output form of max. The second output will be the index of the largest cell.
(Well, of one of the cells that is the largest, you might have more than one that length)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!