%% Compare Arrays
% Expressions that include relational operators on arrays, such as A > 0, are true only when every element in the result is nonzero.
% Test if any results are true using the any function.

limit = 0.75;
A = rand(10,1)

%

if any(A > limit)
    disp('There is at least one value above the limit.')
else
    disp('All values are below the limit.')
end

% Copyright 2015 The MathWorks, Inc.