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

2 ビュー (過去 30 日間)
Sarah A
Sarah A 2020 年 4 月 20 日
編集済み: Sarah A 2020 年 4 月 20 日
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)
  1 件のコメント
Sarah A
Sarah A 2020 年 4 月 20 日
編集済み: Sarah A 2020 年 4 月 20 日
it works. Thank you :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Types についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by