How do I solve Problem number 1 in Matlab? Also please explain how I can recieve bonus
Fantastic news! We've Found the answer you've been seeking!
Question:
How do I solve Problem number 1 in Matlab? Also please explain how I can recieve bonus points for this problem and how to print all the dates the temperature is higher for Denver than New york in one line.
Transcribed Image Text:
Chrome File Edit View History Bookmarks Profiles Tab Window Help Stats Textbook Download HW: Class X 11 -o Class 22 X C Problem 4 X | Class_22 X C Write a M x | Samantha x | Johnatho x | Dashboar x | Pearson x | Course H AP LIT G Gmail Obuckeyelink buckeyemailosu-my.sharepoint.com/personal/li_537_osu_edu/_layouts/15/onedrive.aspx?id=%2Fpersonal%2Fli_537_osu_edu%2FDocuments%2F%21%20ENGR%201181_AU2023_MNS%... Q Member Institutio... ENGR 1181 | Class 22: Advanced loops and Application You are being assigned two problems and one extra-credit problem. Do all problems in one script file: Class_22_App.m Include comment statements to help organize your script file. Include the standard header. Problem 1 The daily high temperature (F) in New York City and Denver, Colorado, during the month of January 2014 is given in the data file "Class22_temperature.txt", where the first column is the temperature of New York, and the second column is the temperature of Denver (data from the U.S. National Oceanic and Atmospheric Administration). The elements in the array are in the order of the days in the month. Class_22_Application.pdf In the script file, perform the following tasks: 1. Load the data. 1. 2. Use the arrays in logical expression method (element-by-element vector operation) to solve the following questions (2-4). You can use the built-in functions such as sum(), mean(), etc. Do not use loops! 2. Determine the average temperature for the month in each city. Use fprintf() to display the results (round the temperature to the nearest integer using the function round()). 3. Determine the number of days that the temperature was above the average in each city. Use fprintf() to display the results. 4. Determine on which days that the temperature in Denver was higher than the temperature in New York. Use fprintf() to display the results. Problem 2 The Taylor series expansion for sin(x) is (bonus +2) Use loops (for or while) w/ if conditional statements to solve this problem for extra credits. Do not use built-in functions sum() and mean(). Use the running sum algorithm to calculate the sum of an array. sin (x) = x- NOV 13 x3 x5 3! 5! 7! n=0 where x is in radians. Write a MATLAB program that determines sin(x) using the Taylor series expansion. Define the angle as 195 degrees. Use a loop for adding the terms of the Taylor series. If an is the nth term in the series, then the sum Sn of the n terms is Sn = Sn-1 + an 3. In each pass, calculate the estimated error E given by Sn E = Sn-1 m (-1)" (2n + 1)! 2n+1 tv A B 10 W Xo Mail - Zaf X O ED Info | Homewor Mon Nov 13 4:22 PM 1/1 G + All Bookmarks X 2023-11...2.25 PM 2023-11...0.27 PM 2023-11...1.03 AM 2023-10...5.16 PM Chrome File Edit View History Bookmarks Profiles Tab Window Help Stats Textbook Download HW: Class X 11 -o Class 22 X C Problem 4 X | Class_22 X C Write a M x | Samantha x | Johnatho x | Dashboar x | Pearson x | Course H AP LIT G Gmail Obuckeyelink buckeyemailosu-my.sharepoint.com/personal/li_537_osu_edu/_layouts/15/onedrive.aspx?id=%2Fpersonal%2Fli_537_osu_edu%2FDocuments%2F%21%20ENGR%201181_AU2023_MNS%... Q Member Institutio... ENGR 1181 | Class 22: Advanced loops and Application You are being assigned two problems and one extra-credit problem. Do all problems in one script file: Class_22_App.m Include comment statements to help organize your script file. Include the standard header. Problem 1 The daily high temperature (F) in New York City and Denver, Colorado, during the month of January 2014 is given in the data file "Class22_temperature.txt", where the first column is the temperature of New York, and the second column is the temperature of Denver (data from the U.S. National Oceanic and Atmospheric Administration). The elements in the array are in the order of the days in the month. Class_22_Application.pdf In the script file, perform the following tasks: 1. Load the data. 1. 2. Use the arrays in logical expression method (element-by-element vector operation) to solve the following questions (2-4). You can use the built-in functions such as sum(), mean(), etc. Do not use loops! 2. Determine the average temperature for the month in each city. Use fprintf() to display the results (round the temperature to the nearest integer using the function round()). 3. Determine the number of days that the temperature was above the average in each city. Use fprintf() to display the results. 4. Determine on which days that the temperature in Denver was higher than the temperature in New York. Use fprintf() to display the results. Problem 2 The Taylor series expansion for sin(x) is (bonus +2) Use loops (for or while) w/ if conditional statements to solve this problem for extra credits. Do not use built-in functions sum() and mean(). Use the running sum algorithm to calculate the sum of an array. sin (x) = x- NOV 13 x3 x5 3! 5! 7! n=0 where x is in radians. Write a MATLAB program that determines sin(x) using the Taylor series expansion. Define the angle as 195 degrees. Use a loop for adding the terms of the Taylor series. If an is the nth term in the series, then the sum Sn of the n terms is Sn = Sn-1 + an 3. In each pass, calculate the estimated error E given by Sn E = Sn-1 m (-1)" (2n + 1)! 2n+1 tv A B 10 W Xo Mail - Zaf X O ED Info | Homewor Mon Nov 13 4:22 PM 1/1 G + All Bookmarks X 2023-11...2.25 PM 2023-11...0.27 PM 2023-11...1.03 AM 2023-10...5.16 PM
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these databases questions
-
Given the following information answer the question. Population Companies with 500+ employees Lubbock 290,805 18 Cumulative Not available payroll of large companies Median $44,139 household income...
-
Use hand calculations to fit the multiple linear regression model 1 y = β0 + β1x1 + β2x2 to the data set in DS 13.6.2. (a) Write down the vector of observed values...
-
Please read the article Value Disciplines (link: https://hbr.org/1993/01/customer-intimacy-and-other-value-disciplines) that explains how companies create value for their customers. After reading the...
-
Per Corporation paid $900,000 cash for 90 percent of Sim Corporation's common stock on January 1, 2011, when Sim had $600,000 capital stock and $200,000 retained earnings. The book values of Sim's...
-
How can social media aid in developing a questionnaire?
-
1. Was Sagarnara an intended third party beneficiary under Dr. Garcias life insurance policy giving her standing to sue the insurer? 2. Did Prudential Insurance Co. violate Dr. Garcias life insurance...
-
Rank the following three single taxpayers in order of the magnitude of taxable income. Assume none of the taxpayers contributed to charity this year. Note: First mean highest taxable income, third...
-
Will NH3 titrated with HNO3 have a pH equivalence point, ofbelow, equal to, or above 7?
-
Refer to the graph, which shows two potential demand curves in the market for photocopies at a printing company If you start at point A on D, what is the percentage change in quantity demanded when...
-
Evaluate the integral x-x+6 x + 3x S = dx
-
Discuss the influence of existentialist philosophy on the themes and characters in Albert Camus's "The Stranger" and Franz Kafka's "The Metamorphosis."
-
Scenario #4 After several years of decline, the market for disposable cameras is making a comeback. Explain whether supply or demand is being affected. Also explain how each of the following events...
-
Determine the Payback, Discounted Payback, Net Present Value, Internal rate of return, Modified internal rate of return, Crossover rate, do the projects on their own, would you accept project, for...
-
Complete the table for refrigerant R-134a: T, C P, kPa v, m3/kg Phase description -12 320 30 0.0065 550 Saturated vapor 60 600
-
Suppose Green Network Energy needs to raise money to finance its new manufacturing facility, but their CFO does not think the company is financially capable of making the periodic interest payments...
-
Clarita is a single taxpayer with two dependent children, ages 10 and 12. Clarita pays $3,000 in qualified child care expenses during the year. If her adjusted gross income (all from wages) for the...
-
Skyler is covered by his company's health insurance plan. The health insurance costs his company $3,500 a year. During the year, Skyler is diagnosed with a serious illness and the health insurance...
-
Deborah purchases a new $30,000 car in 2012 to use exclusively in her business. If Deborah does not elect to expense or take bonus depreciation in 2012 and holds the car until it is fully...
-
In 2022, Mark purchased two separate activities. Information regarding these activities for 2022 and 2023 is as follows: The 2022 losses were suspended losses for that year. During 2023, Mark also...
-
Jerry sprayed all of the landscaping around his business with a pesticide in June 2023. Shortly thereafter, all of the trees and shrubs unaccountably died. The FMV and the adjusted basis of the...
-
In 2023, Julie, a single individual, reported the following items of income and deduction: Julie owns 100% and is an active participant in the rental real estate activity. What is her taxable income...
Study smarter with the SolutionInn App