%% Bounds of Array Page
% Create a 3-D array and compute the smallest and largest 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];
[S1,L1] = bounds(A,[1 2]);
S1
L1

% 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.

[S2,L2] = bounds(A,[1 2 3])
[Sall,Lall] = bounds(A,'all')

% Copyright 2018 The MathWorks, Inc.