How to find the largest length of a cell array?
42 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ashfaq Ahmed
el 4 de Abr. de 2023
Comentada: Walter Roberson
el 4 de Abr. de 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.
0 comentarios
Respuesta aceptada
Walter Roberson
el 4 de Abr. de 2023
max(cellfun(@length, YourCell))
2 comentarios
Walter Roberson
el 4 de Abr. de 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)
Más respuestas (0)
Ver también
Categorías
Más información sobre Matrices and Arrays en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!