%% Evaluate Multiple Conditions in Expression
% Determine if a value falls within a specified range.

x = 10;
minVal = 2;
maxVal = 6;

if (x >= minVal) && (x <= maxVal)
    disp('Value within specified range.')
elseif (x > maxVal)
    disp('Value exceeds maximum value.')
else
    disp('Value is below minimum value.')
end

% Copyright 2015 The MathWorks, Inc.