MATLAB: How to make a cell array of cell arrays

MATLAB

Hi,
How does one make a cell array of cell array in Matlab ? Let's A = (1:70), how can I transform this into a 14×1 cell array for which every cell contains 5 numbers ?
Thank you

Best Answer

"how can I transform this into a 14x1 cell array for which every cell contains 5 numbers"
What you're describing is a cell array of vectors, not a cell array of cells.
c = mat2cell(reshape(A,5,14),5,ones(1,14)); % For column vectors
or
c = mat2cell(reshape(A,5,14)',ones(1,14),5); % For row vectors