InterpolatingFunction
Usage
• InterpolatingFunction[domain, table]表示值由插值给出的近似函数。
Notes
• InterpolatingFunction 和 Function一样使用. • InterpolatingFunction[ ... ][x]找有特殊自变量 x的近似函数的值。
• 在标准输出格式中,只有InterpolatingFunction对象的domain元素明确打印。其他元素由 <>指定。 • domain 指定InterpolatingFunction被构造的数域。
• 如果使用的自变量超出了域的范围,就会产生一个警告,然后返回一个外插值。 • 可能构造取任何个实自变量的InterpolatingFunction对象。
• 可以用 D 和Derivative取对象InterpolatingFunction的导数。 • NDSolve 根据对象InterpolatingFunction返回它的结果。
Further Examples
Here is a table of values of the reciprocal function and an InterpolatingFunction object that represents the data.
In[1]:=
|
Out[1]=
|
In[2]:=
|
Out[2]=
|
An InterpolatingFunction object can be evaluated just like any other Mathematica function. The approximate function reproduces the values given at the data points and it gives approximate values in between.
In[3]:=
|
Out[3]=
|
The approximate function is close to the original reciprocal function for most values in the domain. Evaluate the cell to see the graphic.
In[4]:=
|
In[5]:=
|
|