Question: code this for me Problem 1 / MatlabGrader (15 points, CCO #5) Write a function mySecondDerivativeOrder4 that calculates the second derivative day/ da of a

code this for me

code this for me Problem 1 / MatlabGrader (15
Problem 1 / MatlabGrader (15 points, CCO #5) Write a function mySecondDerivativeOrder4 that calculates the second derivative day/ da of a data set (x, y) with fourth order accuracy. The data is equidistant in a with spacing h. The function input shall be * y: column vector of data values y . h: r-spacing between data points The function output shall be . d2y: column vector of the same size as y containing day/ da The function shall calculate d'y/ da with fourth order accuracy at each data point using only the following formulas that use the nomenclature of Table 8-1 and the lecture notes: -10f(x;-5) +61f(x;-4) - 156f(ci-3) + 214f(x1-2) -154f(ci-1) + 45/(@1 4 (h ) 12/2 (1) f" (x) = f(xi-4) -6f(x1-3) + 14f(x-2) -4f(mi-1) -15f(2:) + 10f(@i+1) + O(h ) (2) 12h2 f"(x]) = f(@-2) +16f(x;_1) -30f(x;) + 16/(ri+1) - f(3:+2) + 0(h) 12h2 (3) f"() = 10f(x1-1) - 15f(x,) -4f(ri+1) + 14f(21+2) -6f(21+3) + /(Ci+4) O(h4 ) (4) 12/2 f"(x) = 45f(2:) -154f(xi+1) + 214f(ri+2) - 156f(ri+3) + 61f(xi+4) - 10f(Ti+5) + O(h' ) (5) 12/2 For every data point, use the most accurate formula, noting that Eq. (3) is the most accurate, followed by Eqs. (2) and (4), and followed by Eqs. (1) and (5). Required submission: I well commented function source code submitted to Matlab Grader using the Canvas link for Exam 5

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 Accounting Questions!