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

The daily maximum temperatures in Washington DC for April 2002 are given in Prob

ID: 3120288 • Letter: T

Question

The daily maximum temperatures in Washington DC for April 2002 are given in Problem 5 above.

PROBLEM 5 Temperatures:

["The following were the daily maximum temperatures (in degree F) in Washington DC during the month of April, 2002: 58 73 73 53 50 48 56 73 73 66 69 63 74 82 84 91 93 89 91 80 59 69 56 64 63 66 64 74 63 69"]

The record daily maximum temperatures (in degree F) for April in the previous 50 years for the city are: 80 90 90 89 88 80 79 78 80 90 92 78 90 88 84 91 93 89 91 80 89 89 86 84 83 86 84 84 83 89.

Identify the following:

(a) The days in April 2002 when the daily maximum temperature equaled or rose above the record maximum for that day.

(b) The number of days in April 2002 when the daily maximum temperature was at least 20 degrees below the record maximum for that day.

please answer in MATLAB code, thank you

Explanation / Answer

c = [58 73 73 53 50 48 56 73 73 66 69 63 74 82 84 91 93 89 91 80 59 69 56 64 63 66 64 74 63 69];
b = [80 90 90 89 88 80 79 78 80 90 92 78 90 88 84 91 93 89 91 80 89 89 86 84 83 86 84 84 83 89];
count=0; %Days when daily max temp equaled or rose above record max of that day.
count1=0; %Days when daily max temp was atleast 20 deg. below record max of that day
for i = 1:30
if c(i)>= b(i)
count=count+1;
end
if c(i) <= b(i)-20
count1 = count1 + 1;
end
  
end

disp(count);
disp(count1);

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote