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

Need Help!!!!! Function Name: tempCheck Inputs: (double) An MxN array of tempera

ID: 639728 • Letter: N

Question

Need Help!!!!!

Function Name: tempCheck

Inputs:

(double) An MxN array of temperatures recorded at the end of month 1

(double) An MxN array of temperatures recorded at the end of month 2

(double) An MxN array of temperatures recorded at the end of month 3

Outputs:

(double) An MxN array of average values over the quarter

(logical) An MxN logical array giving the locations where the thermometers are broken

Function Description:

We here at Global Dynamics have undertaken an experiment over the last quarter that tests the effects of workplace temperature on an individual

Explanation / Answer


function [averages1, broke1] = tempCheck(trialOneTest1,trialOneTest2,trialOneTest3)


len = size(trialOneTest1);

averages1 = zeros(len);
broke1 = zeros(len);

for i = 1:len(1)

for j=1:len(2)
  
if trialOneTest1(i,j) == trialOneTest2(i,j) && trialOneTest1(i,j) == trialOneTest3(i,j)
averages1(i,j) = 0;
broke1(i,j)=true;
else
averages1(i,j) = (trialOneTest1(i,j) + trialOneTest2(i,j) + trialOneTest3(i,j))/3.0;
end
  
end

end

broke1=logical(broke1)
class(broke1)

end


trialOneTest1 = [1,2,3;4,5,6];
trialOneTest2 = [11,12,13;14,15,6];
trialOneTest3 = [21,22,23;24,25,6];

[averages1, broke1] = tempCheck(trialOneTest1,trialOneTest2,trialOneTest3)

------------------------------------------------------------------------------------------------------------------------------------------------

function table1 = multiTable(N)

table1 = zeros(N,N);
  
for i=1:N
for j=1:N
  
table1(i,j)=i*j;
  
end
end
  
end


table1 = multiTable(4)

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