I’m studying and need help with a Computer Science question to help me learn.
-Headerline: functiony_estimate = myspline(x, y, x_estimate)
-Your function should take the input of the known values of x and y and output the y_estimate values interpolated using cubic spline interpolation for the x_estimate values.
-Your function needs to first fill in the F matrix. Your function should be generic so that it can fill in the F matrix for any value of n
-As a class we will go over how to fill in some of the rows of the matrix, F (the second condition). You will need to fill in the rest of the matrix by yourself.
-Your function then needs to fill in the p array (note: this array has to be one column for inv(F)*p to work)
-Remember if you want to change a column array to a row array you can take the transpose (p’ is the transpose of p)
-Once your function fills in the F matrix and the p vector, you can solve for the coefficients in the B vector
-Remember the first 4 coefficients belong to the first spline equation, the second 4 coefficients belong to the second spline equation, and so on.
–B = inv(F)*p; or B = Fp;
Use Matlab please