num2cell
- :
C =num2cell(A)¶ - :
C =num2cell(A, dims)¶ Convert an array into a cell array.
With one argument C has the size of A and
C{k}holdsA(k). With dims, a vector of strictly increasing dimensions, those dimensions are kept inside each cell: C has the size of A with those dimensions set to 1 and every cell holds the corresponding slice.