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

5 Ansichten (letzte 30 Tage)
Sarah A
Sarah A am 20 Apr. 2020
Bearbeitet: Sarah A am 20 Apr. 2020
Hello,
I want to count the number of cells of size 1X1 in the attached matrix, So how can I do that?
Regards,

Akzeptierte Antwort

Fangjun Jiang
Fangjun Jiang am 20 Apr. 2020
a=cellfun(@numel,Out)
sum(a==1)
  1 Kommentar
Sarah A
Sarah A am 20 Apr. 2020
Bearbeitet: Sarah A am 20 Apr. 2020
it works. Thank you :)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Data Types finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by