MATLAB: To save different dimension cell to double

cell of different entries to double

my code generates a cell p = cell
each cell have different number entries..
I wish to write all entries in all cells one after other in a double format///
any direction in this regard will be of great help

Best Answer

C_cell = cell(2) ;
for i =1:2
for j = 1:2
C_cell{i,j} = {rand(3)} ;
end
end
C_double = cellfun(@cell2mat,C_cell,'un',0) ;
C_cell
C_double