%% Bounds of Array Page
% Create a 3-D array and compute the minimum and maximum values in each page of data (rows and columns).

A(:,:,1) = [2 4; -2 1];
A(:,:,2) = [9 13; -5 7];
A(:,:,3) = [4 4; 8 -3];
[minA1,maxA1] = bounds(A,[1 2]);
minA1
maxA1

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

[minA2,maxA2] = bounds(A,[1 2 3])
[minAall,maxAall] = bounds(A,'all')

% Copyright 2020 The MathWorks, Inc.