Question: 2. (15 points) Write an m-file to load the input data and implement the difference equation. Method 1: Vavg(n) = $ lv(n) 3 [u(n) +

2. (15 points) Write an m-file to load the input data and implement the difference equation.2. (15 points) Write an m-file to load the input data and

implement the difference equation. Method 1: Vavg(n) = $ lv(n) 3 [u(n)

Method 1: Vavg(n) = $ lv(n) 3 [u(n) + v(n 1) + vn 2)] , Method 2: Vavg(n) = 0.15v(n) + 0.85Varg(n 1), Method 3: Vang(n) = } [v(n) vn 3)] + Vavg 1). 2. (15 points) Write an m-file to load the input data and implement the difference equation. Hint 1: Calculate the average values by implementing the difference equation in a for loop. Hint 2: You can use the MATLAB command load to import the S&P/TSX Composite Index data from a file named SPTSX.MAT load FILENAME: loads the file with the specified name (a MAT-file by default) into the workspace in a variable with the same name

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!