Question: use Matlab to answer this!! %% Create a 10 array of simulated temperatures (tF) in Fahrenheit for a % 1 month period with number of
use Matlab to answer this!!

%% Create a 10 array of simulated temperatures (tF) in Fahrenheit for a % 1 month period with number of days numDays = 31 according to formula: % F = 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' % 'The highest temperature, Couput value] c, did not occur on a Saturday' % or ** Print the result of the comparison using fprintf
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
