Question: The second picture is help to write the code. I am confused on how to write the code. This is for matlab. Please be sure

The second picture is help to write the code. I am confused on how to write the code. This is for matlab. Please be sure the the graph looks similar to what is given for test points. We cannot just use the spline matlab method to get points. Thank you!  The second picture is help to write the code. I am
confused on how to write the code. This is for matlab. Please

1. Write a function file with the following structure: function s cubicinterp (x,y,z) The function will take data points in arrays z and y and will return an array s containing the values of cubic spline interpolant evaluated at all of the points in the given array z There is a code outline on Canvas to help you with this implementation. You may want to test your function with the following data 0.06-T-0.47 T 1.01 T-1.50 T-2.05 T 2.53 T-2.993.44 y 10499 1.3274 1.3588 1.2550 1.6322 2.5523 3.4462 3.6684 With this test data: (a) The spline coefficients are (a's in the first column, by's in the second, and so on): 0-0.7004 1.0499 0.7946 1.3274 0.4414 -0.8614 0.2810 1.3588 -0.2431 -0.4061 0.9592 1.2550 0.0497 1.0038 0.2776 1.6322 1.4059 1.4618 -0.8275 2.55232.2372 0.27021.9766 3.4462 1.2310 2.45751.8204 (b) With that data, a few (, S(x) values of the interpolant include: (0.8,1.3893), (2.45, 2.3755), and (3.23,3.6253). (c) The plot of the interpolant: Finally, turn in the following for this problem: (a) (5 points) The file cubicinterp.m, emailed to your grader. Please be careful to name your file correctly (b) (5 points) The plot generated by cubicinterp.m for the following set of data x-linspace (-1,1,15); y-1./(1+25.x. 2)

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!