|
ListInterpolation
ListInterpolation[
array
] constructs an InterpolatingFunction object which represents an approximate function that interpolates the array of values given. ListInterpolation[
array
,
xmin
,
xmax
,
ymin
,
ymax
, ...
] specifies the domain of the grid from which the values in array are assumed to come.
You can replace
xmin
,
xmax
etc. by explicit lists of positions for grid lines. The grid lines are otherwise assumed to be equally spaced. ListInterpolation[
array
] assumes grid lines at integer positions in each direction. array can be an array in any number of dimensions, corresponding to a list with any number of levels of nesting. ListInterpolation[
array
,
domain
] generates an InterpolatingFunction object which returns values with the same precision as those in
array
,
domain
. See notes for Interpolation. See the Mathematica book: Section 3.8.2. See also: FunctionInterpolation, ListContourPlot.
Further Examples
ListInterpolation is similar to Interpolation, but provides a more convenient interface for data that does not include coordinates and for multidimensional data. Here is a table of values of a function on a regular three dimensional grid.
In[1]:= 
Out[1]= 
This constructs an approximate function that represents these values. There is not enough data in the z direction (only z
=
0 and z
=
1) for a higher order approximation, so the order in that direction is reduced automatically. (Reducing the order can be done manually; in this case it would have been by specifying the option InterpolationOrder->{3,3,1}.)
In[2]:= 
ListInterpolation::inhr: Requested order is too high; order has been reduced to {3, 3, 1}.
Out[2]= 
The approximation reproduces the values at each of the points in the table.
In[3]:= 
Out[3]= 
You can get approximate values at other points. In this case, the interpolation is a fairly good approximation to the function.
In[4]:= 
Out[4]= 
Here values and derivatives specified at the points , , and . There is not enough data to construct a third order (cubic) polynomial in either the x or the y direction, so the (default) interpolation order of is reduced automatically.
In[5]:= 
ListInterpolation::inhr: Requested order is too high; order has been reduced to {2, 2}.
Out[5]= 
Again, the given values are represented by the approximate function.
In[6]:= 
Out[6]= 
The given derivatives are also represented.
In[7]:= 
Out[7]= 
Where the derivative was given by Automatic, it is computed automatically by the interpolation.
In[8]:= 
Out[8]= 
You can also get approximate values at other points.
In[9]:= 
Out[9]= 
Let's clean up by getting rid of the symbols defined in these examples.
In[10]:= 
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT. SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION. | |