%% Test Arrays of Any Dimension
% Create a 3-by-7-by-5 multidimensional array and test to see if all of its elements are less than 3.

A = rand(3,7,5) * 5;
B = all(A(:) < 3)

%
% You can also test the array for elements that are greater than zero.

B = all(A(:) > 0)

% The syntax A(:) turns the elements of A into a single column vector, so you can use this type of statement on an array of any size.
% Copyright 2012 The MathWorks, Inc.