Question: %% Create a 1D array of simulated temperatures (tF) in Fahrenheit for a % 1 month period with number of days numDays = 31 according

%% Create a 1D array of simulated temperatures (tF) in Fahrenheit for a % 1 month period with number of days numDays = 31 according to formula: % tF = 75 + 10*sin(nDay*0.4*pi) + 10*rand(1,numDays) % Here nDay is the array of Day numbers (nDay - 1,2,3,...numDays

%% Create a 2nd array of temperatures (tC)converted from Fahrenheit to Celsius % according to formula: % tC = (tF - 32)*5/9

%% Create a 3rd array (tCSat) with only Saturdays temperatures in Centigrade % using integer array indexing. Assume that first Saturday falls on nDay = 3

%% Create a 4th array (tCSatHigh) with Saturday temperatures above a threshold % tCHigh = 25 C using logical array indexing

%% Print arrays tCSaturday and tCSatHigh using fprintf function. % Temperature values should be printed with one digit after the decimal point. % Display the units in the printed output (C in this case)

%% Compare the maximum Saturday temperature with the maximum temperature that % occurred that month and use an if/else construct to print out the string % 'The highest temperature, [ ouput value] C, occured on a Saturday' % or % 'The highest temperature, [ouput value] C, did not occur on a Saturday'

%% Print the result of the comparison using fprintf

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!