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

1 visualizzazione (ultimi 30 giorni)
Hello,
I want to count the number of cells of size 1X1 in the attached matrix, So how can I do that?
Regards,

Risposta accettata

Fangjun Jiang
Fangjun Jiang il 20 Apr 2020
a=cellfun(@numel,Out)
sum(a==1)

Più risposte (0)

Categorie

Scopri di più su Matrices and Arrays in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by