How to count the 1X1 cells in a cell array?

2 visualizaciones (últimos 30 días)
Sarah A
Sarah A el 20 de Abr. de 2020
Editada: Sarah A el 20 de Abr. de 2020
Hello,
I want to count the number of cells of size 1X1 in the attached matrix, So how can I do that?
Regards,

Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 20 de Abr. de 2020
a=cellfun(@numel,Out)
sum(a==1)
  1 comentario
Sarah A
Sarah A el 20 de Abr. de 2020
Editada: Sarah A el 20 de Abr. de 2020
it works. Thank you :)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Data Types 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