Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

help plz mathlab write a script that will take the temperature column from the m

ID: 3681350 • Letter: H

Question


help plz mathlab

write a script that will take the temperature column from the matrix named 100 shown below, that will return messages if any of the hot tub temperatures fall below degrees or if any temperatures are above 106 degrees or if all temperatures are within the 100 to 106 degree range. That is, three messages. Hint: all elements must be true to evaluate as true and or not makes a false into a true. 12:00:00 AM 1:00:00 AM 2:00:00 AM 102 30000 AM 4:00 00 AM 103 5:00:00 AM 6:00:00 AM 7:00:00 AM 8:00:00 AM 106 9:00:00 AM 10:00:00 AM 11:00:00 AM 106 12:00:00 PM 104 1 00:00 PM 103

Explanation / Answer

I have written a simple matlab script for the same. It takes an input array hot_tub and checks for the temperature for the array values.

working script:

for i=1:N
if hot_tub(i)<100
disp("Temperature is below 100");
else if hot_tub(i)<107
   disp("Temperature is in between 100 and 106");
else
disp("Temperature is above 106");
end
end