MATLAB Answers

iB
0

how to find how many elements are there in a cell of an array?

Asked by iB
on 21 Sep 2019
Latest activity Commented on by iB
on 21 Sep 2019
I have an array containing cells containing different number of elements, cell1{1,3,4,2}, cell2{2,2,1,2,3,1,1}, cell3{4,9,5}... How to find how many elements in every cell or in a specific cell? thank you

  0 Comments

Sign in to comment.

1 Answer

Answer by madhan ravi
on 21 Sep 2019
 Accepted Answer

No_of_elements = cellfun(@numel, cells)

  1 Comment

Thank You very much

Sign in to comment.