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

2 vues (au cours des 30 derniers jours)
Sarah A
Sarah A le 20 Avr 2020
Modifié(e) : Sarah A le 20 Avr 2020
Hello,
I want to count the number of cells of size 1X1 in the attached matrix, So how can I do that?
Regards,

Réponse acceptée

Fangjun Jiang
Fangjun Jiang le 20 Avr 2020
a=cellfun(@numel,Out)
sum(a==1)
  1 commentaire
Sarah A
Sarah A le 20 Avr 2020
Modifié(e) : Sarah A le 20 Avr 2020
it works. Thank you :)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Data Types 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!

Translated by