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

A(:,:,1) = [2 0; 0 0];
A(:,:,2) = [0 0; 0 0];
A(:,:,3) = [0 0; 0 1];
B = any(A,[1 2])

% Copyright 2018 The MathWorks, Inc.