How to find the largest length of a cell array?
43 次查看(过去 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.
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!