%% Matrices in a Cell Array
% Create a cell array containing two matrices, and concatenate the matrices both vertically and horizontally.

M1 = [1 2; 3 4];
M2 = [5 6; 7 8];
A1 = {M1,M2};
Cvert = cat(1,A1{:})
Chorz = cat(2,A1{:})

% Copyright 2018 The MathWorks, Inc.