%% Divide Array and Return Subarrays in Cell Array
% Create a 5-by-4 numeric array.

A = reshape(1:20,5,4)'

%
% Divide A into two 2-by-3 and two 2-by-2 subarrays. Return the subarrays in a cell array.

C = mat2cell(A,[2 2],[3 2])

%
% Display the subarrays in C using the celldisp function.

celldisp(C)

% Copyright 2018 The MathWorks, Inc.