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

2 views (last 30 days)
Hello,
I want to count the number of cells of size 1X1 in the attached matrix, So how can I do that?
Regards,

Accepted Answer

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

More Answers (0)

Categories

Find more on Data Types in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!