I am trying to do the same thing as the following example but checking an array of numbers and not just x. However it is not working. can someone help?
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
Best Answer