%% Product of Array Page
% Create a 3-D array and compute the product over each page of data (rows and columns).

A(:,:,1) = [2 4; -2 1];
A(:,:,2) = [1 2; -5 3];
A(:,:,3) = [4 4; 1 -3];
B1 = prod(A,[1 2])

% To compute the product over all dimensions of an array, you can either specify each dimension in the vector dimension argument, or use the 'all' option.

B2 = prod(A,[1 2 3])
Ball = prod(A,'all')

% Copyright 2018 The MathWorks, Inc.