Cubic spline interpolation vs polynomial interpolation

前端 未结 2 1579
情书的邮戳
情书的邮戳 2020-12-07 00:06

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]
         


        
2条回答
  •  广开言路
    2020-12-07 00:20

    Interpolation makes sure the values of the interpolated function are the same as the values of original function at the points you provided. Looking at your code, it means that f(35) will be same and will be equal to 31 for every interpolation method.

    However, depending on the method of interpolation, the curve between each of the consecutive methods will vary, hence giving you different values, which is expected.

提交回复
热议问题