MATLAB Answers

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

3 views (last 30 days)
Sarah A
Sarah A on 20 Apr 2020
Edited: Sarah A on 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,

  0 Comments

Sign in to comment.

Accepted Answer

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

More Answers (0)

Community Treasure Hunt

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

Start Hunting!