Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

It's a matlab question Function Name: stockExchange Inputs 1. (double) A 2xN array of data from the New York Stock Exchange Outputs 1. (double) A

It's a matlab question

image text in transcribed

Function Name: stockExchange Inputs 1. (double) A 2xN array of data from the New York Stock Exchange Outputs 1. (double) A 2xN array of updated data Background Due to years of poor record keeping, the New York Stock Exchange is missing valuable historical information about the prices of stocks and needs your help! The previous record keeper missed work often, and for each day of absence a stock price is missing in the NYSE's data. Impressed with your MATLAB knowledge, the Head of Data Management and Analytics hires you to avert the impending data crisis Function Description: You are given an array containing two rows, the first corresponding to a day of the month and the second corresponding to the price of a particular stock on that day. On a day when the record keeper was absent, there will be an NaN in the index of the stock price for that day. Your function should replace each NaN with the correct stock price, which you will determine by spline interpolation Example >> arrL 4 6 8 200.10 203.20 NaN 197.41 201.30 200.00 NaN 206.4] out stockExchange (arr) out[1 4. 6 200.10 203.20 199.34 197.41 201.30 200.00 198.35 206.4] Notes . Do not use iteration to solve this problem . If an NaN occurs in the first or last index, you should extrapolate the data to find the correct stock price . All computed stock prices should be rounded to the nearest penny . Use of the spline function with inputs that contain NaN is not required to solve this problem. If you choose to solve it this way you can ignore the warning produced Hints . What happens when you call isnan) with a vector input? Function Name: stockExchange Inputs 1. (double) A 2xN array of data from the New York Stock Exchange Outputs 1. (double) A 2xN array of updated data Background Due to years of poor record keeping, the New York Stock Exchange is missing valuable historical information about the prices of stocks and needs your help! The previous record keeper missed work often, and for each day of absence a stock price is missing in the NYSE's data. Impressed with your MATLAB knowledge, the Head of Data Management and Analytics hires you to avert the impending data crisis Function Description: You are given an array containing two rows, the first corresponding to a day of the month and the second corresponding to the price of a particular stock on that day. On a day when the record keeper was absent, there will be an NaN in the index of the stock price for that day. Your function should replace each NaN with the correct stock price, which you will determine by spline interpolation Example >> arrL 4 6 8 200.10 203.20 NaN 197.41 201.30 200.00 NaN 206.4] out stockExchange (arr) out[1 4. 6 200.10 203.20 199.34 197.41 201.30 200.00 198.35 206.4] Notes . Do not use iteration to solve this problem . If an NaN occurs in the first or last index, you should extrapolate the data to find the correct stock price . All computed stock prices should be rounded to the nearest penny . Use of the spline function with inputs that contain NaN is not required to solve this problem. If you choose to solve it this way you can ignore the warning produced Hints . What happens when you call isnan) with a vector input

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

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions

Question

5. Understand how cultural values influence conflict behavior.

Answered: 1 week ago