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

2 次查看(过去 30 天)
Hello,
I want to count the number of cells of size 1X1 in the attached matrix, So how can I do that?
Regards,

采纳的回答

Fangjun Jiang
Fangjun Jiang 2020-4-20
a=cellfun(@numel,Out)
sum(a==1)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Types 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by