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

Temperature data T (in Fahrenheit) for a city for the years 2003-2005 recorded o

ID: 3691147 • Letter: T

Question

Temperature data T (in Fahrenheit) for a city for the years 2003-2005 recorded over the first six months of each year are given below. Enter the 6 Times 3 matrix of levels by hand into MATLAB. Then, with at most two MATLAB commands determine the months and years that have recorded temperatures T > 37. Print your results in the form of a table. With a single command, calculate the average temperatures over the 6-month period recorded at each of the three years (1 Times 3 array). With a single command calculate the average temperature averaged over the three years for each month (8 Times 1 array). Write the code and numerical results or answers (if any) for all the above questions in the space below.

Explanation / Answer


Answer for Question 1:

this below Matlab code write the values greater than 37

that have recorded temperatures T > 3

Matrix = [28 38 39; 25 29 24; 50 53 52; 61 60 62; 67 61 68; 74 78 88];
[Num_rows Num_cols] = size(Matrix);
for Row = 1:Num_rows
for Col = 1:Num_cols
if Matrix(Row, Col) > 37
               printf('Element (%d,%d) = %d. ', Row, Col, Matrix(Row, Col))
end
end

Answer for Question 2:

mean command is used for calculate the mean of the given array


Matrix = [28 38 39; 25 29 24; 50 53 52; 61 60 62; 67 61 68; 74 78 88];

M = mean(Matrix)

This above command is calculate the each column average value.

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