Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can i get help coding this matlab problem please Problem #1 Background: You are provided a three-column matrix named TempDats, which stores the daily minimum,

Can i get help coding this matlab problem please image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Problem #1 Background: You are provided a three-column matrix named TempDats, which stores the daily minimum, average, and maximum temperatures (in the first, second, and third column, respectively) of a given location for an entire year. TempData will consist of 365 or 366 rows, depending on whether or not the recorded year is a leap year, and will always consist of 3 columns. In addition to this, a three-element row vector named Overall is provided that contains the minimum temperature ever recorded at the given location in the first column, and so on for the remaining two statistics. Using these two matrices, complete the following tasks: 1. For each minimum value in TempData, determine which values are less than the long-term minimum value provided in Overall and separate them into a new column vector named ColdDays. If no values are found that meet this criterion, output a warning to the user informing them so. 2. For each average value in TempData, determine which values are greater than the long-term average value provided in Overall and separate them into a new column vector named AvgDays. If no values are found that meet this criterion, output a warning to the user informing them so. 3. For each maximum value in TempData, determine which values are greater than the long-term maximum value provided in Overall, and separate them into a new column vector named HotDays. If no values are found that meet this criterion, output a warning to the user informing them so. 4. Create a new three-element vector named New that will contain the number of days with temperatures less than the long-term minimum (from Step 1) in the first column, and the number of days with temperatures greater than the long-term average/maximum (from Step 2 and 3, respectively) in the second and third columns, respectively 5. Create a new three-element vector named Change that contains the respective differences between the three long term values and the overall minimum, average, and maximum of TempData. If any of the three statistics for TempData are less than their long-term counterparts, the difference will be negative. 6. Calculate the total number of days from TempData that have an average temperature greater than the long-term average. If this calculated number is greater than half the number of days in the given year, store the difference in a new variable named Excess. As an example, if you determined 203 days to have a temperature greater than the long-term average in a leap year, Excess would store the value of 20, as that is the difference between 203 and 183 (half the number of days in a leap year). For non-leap years, round your value up. a. Note: Excess should store a value 0 Output all of the information from New, Change, and Excess to the command window in a formatted output. See the example below for guidance regarding formatting. 7. SampleOutputte Command window (ignore">>") Example of warnings to output to user: You can test this by changing the values in the overall.csv file. Command Window Warsing: For the data provided, ie deys were found to have a tonperature louer than t Mareing: For the data provided, so days were found he Long-term ainins to have a tenperature greater than the rature greater than the For the data provided, go days were found to have a tesper

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems A Practical Approach To Design Implementation And Management

Authors: THOMAS CONNOLLY

6th Edition

9353438918, 978-9353438913

More Books

Students also viewed these Databases questions

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago