Write a MATLAB script (m-file), which will create an array of simulated daily local temperatures and...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. 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.
Expert Answer:
Related Book For
Posted Date:
Students also viewed these databases questions
-
You have been provided with the description of a programming language, J, intended for scripting applications. Its syntax is similar to a cut-down version of Java in that it consists of function...
-
Define how conflict may be specified in terms of object operation semantics. Give an example of conflicting operations. Give an example of non-conflicting operations that would conflict with...
-
Why should one-time write-offs of fixed capital be used in absorption cost systems?
-
Dane ASA both purchases and constructs various equipment it uses in its operations. The following items for two different types of equipment were recorded in random order during the calendar year...
-
What are creative bookkeeping techniques? Provide three examples.
-
Describe multiple interfaces and explain why or when they are needed.
-
The December 31, 2011, Balance Sheet and the 2012 Statement of Cash Flows for Snow, Inc., follow: Requirement 1. Prepare the December 31, 2012, balance sheet for Snow,Inc. Snow, Inc. Balance Sheet...
-
Sandhill, Inc. sponsors a defined-benefit pension plan. The following data relates to the operation of the plan for the year 2021. Service cost $ 425000 Contributions to the plan 410000 Actual return...
-
The Ploughman family owns and operates a 640-acre farm that has been in the family for several generations. The Ploughmans always have had to work hard to make a decent living from the farm and have...
-
ain Your answer is incorrect (a) The organizers of a conference want to survey attendees about the registration fee. Which of the following best describes a convenience sample of attendees? O The...
-
Why has Gatorade been so successful in the sports drink market?
-
In the Heckscher-Ohlin model, as trade occurs in a capital-abundant country, increased imports will force domestic import- competing firms to decrease prices and production. Labor and capital will...
-
In February 2 0 1 6 , hackers targeted the central bank of Bangladesh and exploited vulnerabilities in SWIFT, the global financial system s main electronic payment messaging system, trying to steal...
-
Explore the significance of intermedial allusions in multimedia storytelling, such as in graphic novels or hypertext fiction, and their implications for narrative coherence and interpretation.
-
You observe the price of a latte changes from $4 to $5. Instructions: Round your answer to one decimal place. If you are entering a negative number include a minus sign. a. What is the percentage...
-
Briefly define the term 'outline'. List TWO uses of an outline. List ANY SIX outline rules.
-
1. Which of the four major types of information systems do you think is the most valuable to an organization? 2. How do you critically associate the ideas of business agility and business efficiency...
-
Consider a filter with frequency response or a sinc function in frequency. (a) Find the impulse response h(t) of this filter. Plot it and indicate whether this filter is a causal system or not. (b)...
-
Suppose you want to design a dc-source using a half-wave rectified signal x(t) and an ideal filter. Let x(t) be periodic, T 0 = 2, and with a period (a) Find the Fourier transform X(Ω) of...
-
Determine the impulse response h[n]of the feedback system shown in Figure 10.18. Determine if the system is BIBO stable. Figure 10.18: e[n] r[n]- Delay y[n]
-
Analysis of Canadian Manufacturing Workers Workhours. The time plot in Figure 18 . 22 describes the average annual number of weekly hours spent by Canadian manufacturing workers...
-
Souvenir Sales. The file SouvenirSales.csv contains monthly sales for a souvenir shop at a beach resort town in Queensland, Australia, between 1995 and 2001. [Source: Hyndman and Yang (2018).] Back...
-
Toys R US Revenues. Figure 18 . 23 is a time plot of the quarterly revenues of Toys R US between 1992 and 1995 (thanks to Chris Albright for suggesting the use of these data, which are available in...
Study smarter with the SolutionInn App