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 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