In: Advanced Math
I have the following discrete data.
x=[missing, missing, missing, 758, 763, 742, 729, 721, 714, 709, 696, 680 ]
y=[87.5, 86.4, 84.5, 83.6, 83.2, 84.0 83.2, 82.6, missing, 82.0, 81.2, 80.8 ]
Use cubic spline to predict the y-value at a x-value of 735 (using carefully commented matlab code).
Please present the theory behind the mathematics of the model. I prefer if you do all this as handwritten notes
In which range could the validity of the model be and why?
y-value predicted = 83.6521
Matlab Code:
clf; close all; clearvars; clc
x = [758 763 742 729 721 709 696 680];
y = [83.6 83.2 84 83.2 82.6 82 81.2 80.8];
pp = spline(x,y); %Added this line in code to get coefficients
of spline polynomials (read handwritten pictures)
y_pred = spline(x,y,735);
coeff (description given in attached pictures)
-6.66738690759402e-05
0.00426027105801941 -0.0260958264448695
80.8000000000000 %correspond to s1(x)
-6.66738690759400e-05 0.00105992534237428
0.0590273159614295 81.2000000000000
0.000109045440120756 -0.00154035555158738
0.0527817232416592 82
-0.000109422851215722 0.00238528029275983
0.0629208201357286 82.6000000000000
-9.11619531040150e-05 -0.000240868136417494
0.0800761173864673 83.2000000000000
3.18145050926097e-05 -0.00379618430747408
0.0275944356158768 84
3.18145050926094e-05 -0.00226908806302882
-0.0694499223121695 83.6000000000000 % correspond to
s7(x)