当前位置:网站首页>Preprocessing - interpolation

Preprocessing - interpolation

2022-07-07 03:45:00 Lu 727

1、 effect

If the function f(x) In independent variable x The function values corresponding to some discrete values are known , Then you can make an appropriate specific function p(x), bring p(x) The function value taken in these discrete values , Namely f(x) Known value of . So that you can use p(x) To estimate f(x) The function value corresponding to the independent variable between these discrete values , This method is called interpolation .

2、 Input / output description

Input : Raw data with missing values
Output : Data after adding missing values

3、matlab

y_{i}=interp1\left ( x,y,x_{i},'method' \right )

x,y Is the original one-dimensional data ,xi Is the interpolation point ,method by ‘nearest’ Adjacent point interpolation ;‘linear’ linear interpolation ;‘spline’ Cubic spline interpolation ;‘pchip’ Cubic interpolation .

z_{i}=interp2\left ( x,y,z,x_{i},y_{i},'method' \right )

x,y Is the original one-dimensional coordinate data ,z Is the original height matrix ,xi,yi Is the interpolation point ,method by ‘nearest’ Adjacent point interpolation ;‘linear’ linear interpolation ;‘spline’ Cubic spline interpolation ;‘cubic’ Cubic interpolation .

4、 Modeling steps

Lagrange interpolation

Polynomial degree exceeds 7 when , Will produce serious Runge The phenomenon , Therefore, the data can be divided into multiple intervals , Interpolate independently in each interval

原网站

版权声明
本文为[Lu 727]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207062038146385.html