EGRE 207 – Electrical Circuits II Late penalty: 10% per hour late. This is a MATLAB assignment. You need to read section 9.5 Regression Analysis from the Ibe textbook to be able to complete the...

1 answer below »
you need to write a math lab code and paper typed question on the paperfollow the direction of the problem.


EGRE 207 – Electrical Circuits II Late penalty: 10% per hour late. This is a MATLAB assignment. You need to read section 9.5 Regression Analysis from the Ibe textbook to be able to complete the assignment. Choose ONE of the problems below. Turn in the following: 1. The complete MATLAB code in a single file called hw7.m 2. Your input data file (text, Excel, etc) 3. Numerical results and figures in a single PDF file Notes: · This is completely independent work. No MATLAB assistance will be given. I will only answer questions regarding clarification of the assignment, no other help. · Feel free to discuss possible solutions with your colleagues and search the internet for suggestions. However, you are expected to choose your own data and write your own MATLAB code. Problem 1: 1. (10%) Access the James River water level data on the USGS web site (http://waterdata.usgs.gov/va/nwis/current/?type=flow) and choose a station in Virginia, for example JAMES RIVER NEAR RICHMOND, VA. Download a table of gage height (not discharge) data covering at least 3 weeks. Choose your own begin date. Load the gage height data into MATLAB. You will have to figure this out by yourself. Hints: click only gage height, choose tab-separated format, copy into Excel, edit the Excel file as needed, use xlsread() to read into MATLAB. 2. (10%) Plot the height as a function of time. 3. (15%) Calculate the mean, median, and standard deviation of the gage height for each of the 3 weeks. Include these values in your submission. 4. (10%) Plot the histogram of the height over the entire 3-week period. 5. (15%) Plot a box-and-whiskers plot, with one box for each of the 3 weeks. Hint: There is a MATLAB function that does that. 6. (40%) Define a vector "X" of height values that starts at the beginning of your observed time period and ends a week later. Define a second vector, "Y", of height values, of the same length, that starts and ends one hour later than "X". Perform a linear regression analysis of the two variables (X and Y), that is, compute the parameters a and b as described in the textbook. Also plot X vs Y. Note: You have to write your own code to compute the parameters a and b, you cannot use MATLAB functions other than sum(). Failure to do so will mean you lose all 40%. Ask if you need clarification. Problem 2: 1. (10%) Access the USD exchange rate data on the WSJ web site (https://www.wsj.com/market-data/currencies). Download a table of exchange rates covering at least 3 months. Choose your own begin date and comparison currency (EUR, CAD, etc). Load the rate data into MATLAB. You will have to figure this out by yourself. Hints: click on a currency, then on "advanced charting", then "all sections... historical prices", then "download a spreadsheet". Edit the CSV file as needed, keep only the closing rate. Use cvsread() to load into MATLAB. 2. (10%) Plot the exchange rate as a function of time. 3. (15%) Calculate the mean, median, and standard deviation of the rate for each of the 3 months. Include these values in your submission. 4. (10%) Plot the histogram of the rate over the entire 3-month period. 5. (15%) Plot a box-and-whiskers plot, with one box for each of the 3 months. Hint: There is a MATLAB function that does that. 6. (40%) Define a vector "X" of rate values that starts at the beginning of your observed time period and ends two months later. Define a second vector, "Y", of rate values, of the same length, that starts and ends one week later than "X". Perform a linear regression analysis of the two variables (X and Y), that is, compute the parameters a and b as described in the textbook. Also plot X vs Y. Note: You have to write your own code to compute the parameters a and b, you cannot use MATLAB functions other than sum(). Failure to do so will mean you lose all 40%. Ask if you need clarification. Problem 3: 1. (10%) Access the USD price of crude oil data on the U.S. Energy Information Administration's web site (http://www.eia.gov/dnav/pet/hist/LeafHandler.ashx?n=PET&s=RWTC&f=W). Download a table of prices covering at least 3 years. Choose your own begin date. Load the price data into MATLAB. You will have to figure this out by yourself. Hints: download as Excel file, edit the file as needed (only keep the data you need) and use xlsread() to load into MATLAB. 2. (10%) Plot the price as a function of time. 3. (15%) Calculate the mean, median, and standard deviation of the price for each of the 3 years. Include these values in your submission. 4. (10%) Plot the histogram of the price over the entire 3-year period. 5. (15%) Plot a box-and-whiskers plot, with one box for each of the 3 years. Hint: There is a MATLAB function that does that. 6. (40%) Define a vector "X" of price values that starts at the beginning of your observed time period and ends two years later. Define a second vector, "Y", of price values, of the same length, that starts and ends one month later than "X". Perform a linear regression analysis of the two variables (X and Y), that is, compute the parameters a and b as described in the textbook. Also plot X vs Y. Note: You have to write your own code to compute the parameters a and b, you cannot use MATLAB functions other than sum(). Failure to do so will mean you lose all 40%. Ask if you need clarification. Problem 4: 1. (10%) Access the historical temperature data on the NEWA web site (http://newa.cornell.edu/index.php?page=hourly-weather) and choose a location of your choice. Download (cut/paste) a table of temperature data covering at least 3 days. Choose your own begin date. Load the temperature data into MATLAB. You will have to figure this out by yourself. Hints: edit the file as needed (only keep the data you need) and use xlsread() to load into MATLAB. 2. (10%) Plot the temperature as a function of time. 3. (15%) Calculate the mean, median, and standard deviation of the temperature for each of the 3 days. Include these values in your submission. 4. (10%) Plot the histogram of the temperature over the entire 3-day period. 5. (15%) Plot a box-and-whiskers plot, with one box for each of the 3 days. Hint: There is a MATLAB function that does that. 6. (40%) Define a vector "X" of temperature values that starts at the beginning of your observed time period and ends 2 days later. Define a second vector, "Y", of temperature values, of the same length, that starts and ends 2 hours later than "X". Perform a linear regression analysis of the two variables (X and Y), that is, compute the parameters a and b as described in the textbook. Also plot X vs Y. Note: You have to write your own code to compute the parameters a and b, you cannot use MATLAB functions other than sum(). Failure to do so will mean you lose all 40%. Ask if you need clarification.
Answered 2 days AfterApr 27, 2021

Answer To: EGRE 207 – Electrical Circuits II Late penalty: 10% per hour late. This is a MATLAB assignment. You...

Avinash Kumar answered on Apr 29 2021
137 Votes
1. (10%) Access the James River water level data on the USGS web site
(http://waterdata.usgs.gov/va/nwi
s/current/?type=flow) and choose a station in
Virginia, for example JAMES RIVER NEAR RICHMOND, VA. Download a
table of gage height (not discharge) data covering at least three weeks. Choose
your own begin date. Load the gage height data into MATLAB. You will have to
figure this out by yourself. Hints: click only gage height, choose tab-separated
format, copy into Excel, edit the Excel file as needed, use xlsread() to read into
MATLAB.
Ans: Table of gage height data for JAMES RIVER NEAR RICHMOND, VA
covering three weeks starting from 01-04-2021 to 21-04-2021 is downloaded and
saved in an Excel file named "Water_data_James_river." The Excel sheet contains
four columns: Date, Time(hh: mm), Time(Converted to hours as decimal numbers),
and gage height. The total time for three weeks is (3*7*24=504 hrs)
The "xlsread" command is used to read data into MATLAB. Only the last two
columns are read into MATLAB. The...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here