Question: Write a MATLAB script (m-file), which will create an array of simulated daily local temperatures and analyze the data. Specifically: 1) Create a column

Write a MATLAB script (m-file), which will create an array of simulated daily local temperatures and analyze the data. Specifically: 1) Create a column array daysN of day numbers (daysN = 1, 2, 3, ..., numDays), where numDays = 30 2) Create an array tK of temperatures in degrees of Kelvin with the number of elements = numDays according to the model: tK = 283.15 + 24* sin((daysN - 1)*10*pi/numDays) 3) Write an external m-file function KtoF which converts Kelvin temperatures to Fahrenheit temperatures according to THE formula (F- Fahrenheit, K- Kelvin): F= K*9/5-459.67 Call this function from your script to create an array of Fahrenheit temperatures tF from the array tk 4) Create an array tFSun with only Sundays temperatures in Fahrenheit. Assume that daysN = 1 is Sunday 5) Print the array tFSun to the screen using the fprintf function with one digit after the decimal point Name your script YourLastName_HW4.m and function KtoF.m and submit them on Canvas.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
