MATLAB: CAT arguments dimensions are not consistent. in the cell array.

cell2mat

Hi every one…
I have a cell array containing cell array like this
C =
{1×1 cell} {1×32 cell} {1×32 cell} {1×64 cell} {1×64 cell} {1×1 cell};
i have tried this function
x=cellfun(@cell2mat,C','UniformOutput',false);
i'm getting this error:CAT arguments dimensions are not consistent
however i came to know C(1,1) are same rows and columns but 2nd cell array containing 1row 32 columns of cell array if anyone the solution please let me know.
thanks in advance

Best Answer

Maybe you are looking for
C={num2cell(rand(1,3)),num2cell(rand(1,6))}
x=cell2mat(cellfun(@cell2mat,C,'Un',0))