%% Sum of 3-D Array
% Create a 4-by-2-by-3 array of ones and compute the sum along the third dimension.

A = ones(4,2,3);
S = sum(A,3)

% Copyright 2015 The MathWorks, Inc.