>> Mat
Mat =
3×1 cell array
{1×4 double}
{1×5 double}
{1×6 double}
Mat
is of type n-by-1 cell array, and each element is of type 1-by-m cell array.
How to extract each element count of a 2D cell array into num
without iterations?
>> num
num =
4
5
6
It's simple:
cellfun(@numel,mat)