I am asked to investigate the different types of interpolation using Matlab for the following points:
x = [32 34 35 36 37 38]
y = [26 28 31 30 29 25]
and find the values for f(33), f(33.5) and f(35).
When plotting x and y, I can see that f(33) should be around 27, which is also what I get using interp1(x,y,33).
I am not sure if this is the correct way of using the Cubic spline interpolation function but I used spline(x,y,33) and got ans = 24.3906.
Shouldn't I still get the same value for f(33) no matter what type of interpolation I use?