%% Nonzero Elements in Array Page
% Create a 3-D array and determine if all elements in each page of data (rows and columns) are zero.

A(:,:,1) = [2 1; 3 5];
A(:,:,2) = [0 0; 0 0];
A(:,:,3) = [-2 9; 4 1];
B = all(A,[1 2])

% Copyright 2018 The MathWorks, Inc.