how to find how many elements are there in a cell of an array?

42 visualizaciones (últimos 30 días)
iB
iB el 21 de Sept. de 2019
Comentada: iB el 21 de Sept. de 2019
I have an array containing cells containing different number of elements, cell1{1,3,4,2}, cell2{2,2,1,2,3,1,1}, cell3{4,9,5}... How to find how many elements in every cell or in a specific cell? thank you

Respuesta aceptada

madhan ravi
madhan ravi el 21 de Sept. de 2019
No_of_elements = cellfun(@numel, cells)

Más respuestas (0)

Categorías

Más información sobre Cell Arrays en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by