How to find the largest length of a cell array?
29 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ashfaq Ahmed
le 4 Avr 2023
Commenté : Walter Roberson
le 4 Avr 2023
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 commentaires
Réponse acceptée
Walter Roberson
le 4 Avr 2023
max(cellfun(@length, YourCell))
2 commentaires
Walter Roberson
le 4 Avr 2023
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)
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Resizing and Reshaping Matrices dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!