Interpolation
Usage
• Interpolation[data] 构造一个InterpolatingFunction对象,该对象表示对数据插值的近似函数。
Notes
• Interpolation 通过在连续数据点间拟合多项式曲线使用。 • 多项式曲线的次数由选项InterpolationOrder指定。
• 缺省设置是 InterpolationOrder -> 3.
• 可以通过使用设置 InterpolationOrder -> 1 进行线性插值。 • Interpolation[data] 产生一个InterpolatingFunction对象,该对象返回和在 data中的有相同精度的值。 • 参见 Mathematica 全书 : 节 3.8.2.
Further Examples
Approximating Sqrt Here is a table of values of the square root function at the points .
In[1]:=
|
Out[1]=
|
This constructs an approximate function that represents these 11 values on the domain .
In[2]:=
|
Out[2]=
|
The values of the function match the data at the given points.
In[3]:=
|
Out[3]=
|
The function also gives a fair approximation to the square root function at other points between and .
In[4]:=
|
Out[4]=
|
A plot of the difference between the two functions shows that the approximation is better at some points than at others. Evaluate the cell to see the graphic.
In[5]:=
|
In[6]:=
|
|