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

Read the instruction below and Answer the questions #4 by using MATLAB software.

ID: 2248216 • Letter: R

Question

Read the instruction below and Answer the questions #4 by using MATLAB software. Please add common line in your code. Question : "Repeat the process of finding the maximum of maxT maximum of minT using a "for loop" inside your m file. Cannot attached the excel file and thus I screen shot the excel file and post the image below instead of attached the excel file. Please copy the image to the microsoft excel in your computer and answer the questions. Excel file name: Asheville_1999

[data,txt,~] = xlsread('Asheville_1999.xlsx');

Month = txt(3:end,1);

MaxT = data(:,1);

MinT = data(:,2);

maxtempmax = max(MaxT)

maxtempmin = max(MinT)

...

4,Use the max function to display the maximum value for maxT and minT. Save them under maxtempmax and maxtempmin. Repeat the process of finding the maximum of maxT maximum of mint using a "for loop" inside your m file. Call those maxloopmax and maxloopmin Compare a maxtempmax and maxloopmax b. maxtempmin and maxloopmin using the "norm" Display your finding.

Explanation / Answer

clc;
[data,txt,~] = xlsread('Asheville_1999.xlsx');
%File 'asheville_1999' should be in same folder as our .m file
MaxT = data(:,1);
%extrate MaxT
MinT = data(:,2);
%extrate MinT

maxtempmax = max(MaxT);
maxtempmin = max(MinT);

maxloopmax=0;
maxloopmin=0;
for i = 1:12
if maxloopmax<MaxT(i)   
maxloopmax = MaxT(i)
end
if maxloopmin < MinT(i)
maxloopmin = MinT(i)
end
end
  
x=norm(maxloopmax-maxtempmax)
y=norm(maxloopmin-maxtempmin)