%% Combine Across Multiple Dimensions
% Create a cell array by combining elements into numeric arrays along several dimensions.

A = reshape(1:12,4,3);
A(:,:,2) = A*10
c = num2cell(A,[1 3])

%
% Each 4-by-1-by-2 array contains elements from along the first and third dimension of A:

c{1}

%

c = num2cell(A,[2 3])

% Copyright 2015 The MathWorks, Inc.