%% 3-D Array to Matrix
% Create a 2-by-1-by-2 array and remove the dimension of length 1, resulting in a 2-by-2 matrix.

A = zeros(2,1,2);
A(:,:,1) = [1 2]';
A(:,:,2) = [3 4]'
B = squeeze(A)

% Copyright 2015 The MathWorks, Inc.