SUBJECT:MATHEMATICS & COMPUTING; cubic splines Write a function file with the fo
ID: 3281630 • Letter: S
Question
SUBJECT:MATHEMATICS & COMPUTING; cubic splines
Write a function file with the following structure: function s = cubicinterp (x, y, z) The function wl take data points in arrays r 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 You may want to test your function with the following data: 0.060.47 1.0.502.05 2.53 2.993.44 1.0499 1.3274 1.3588 1.25501.63222.5523 3.4462 3.6684 With this test data: (a) The spline coefficients are (a,'s in the first column, b's in the second, and so on): 1.0499 1.3274 1.3588 1.2550 1.6322 2.5523 3.4462 0.7946 0.4414 -0.2431 0.0497 1.4059 2.2372 1.2310 0.8614 0.4061 1.0038 1.4618 0.2702 2.4575 0.7004 0.2810 0.9592 0.2776 0.8275 1.9766 1.8204 (b) With that data, a few (x, S() values of the interpolant include: (0.8, 1.3893), (2.45, 2.3755), and (3.23, 3.6253) c) The plot of the interpolantExplanation / Answer
CODE:
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.