This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

ListInterpolation

ListInterpolation[array]
constructs an InterpolatingFunction object that represents an approximate function that interpolates the array of values given.
ListInterpolation
specifies the domain of the grid from which the values in array are assumed to come.
  • You can replace etc. by explicit lists of positions for grid lines. The grid lines are otherwise assumed to be equally spaced.
  • array can be an array in any number of dimensions, corresponding to a list with any number of levels of nesting.
  • ListInterpolation supports a Method option. Possible settings include for spline interpolation and for Hermite interpolation.
Construct an approximate function that interpolates the data:
Apply the function to find interpolated values:
Plot the interpolation function:
Compare with the original data:
Construct an approximate function with the x values equally spaced on the interval :
Apply the function to find interpolated values:
Plot the interpolation function with the original data:
Construct an approximate function that interpolates the values from an array of values:
Plot the function with the original data:
Construct an approximate function that interpolates the data:
In[1]:=
Click for copyable input
Out[1]=
Apply the function to find interpolated values:
In[2]:=
Click for copyable input
Out[2]=
Plot the interpolation function:
In[3]:=
Click for copyable input
Out[3]=
Compare with the original data:
In[4]:=
Click for copyable input
Out[4]=
 
Construct an approximate function with the x values equally spaced on the interval :
In[1]:=
Click for copyable input
Out[1]=
Apply the function to find interpolated values:
In[2]:=
Click for copyable input
Out[2]=
Plot the interpolation function with the original data:
In[3]:=
Click for copyable input
Out[3]=
 
Construct an approximate function that interpolates the values from an array of values:
In[1]:=
Click for copyable input
Out[1]=
Plot the function with the original data:
In[2]:=
Click for copyable input
Out[2]=
Interpolate between points at arbitrary x values:
The x values may be included in the data directly:
Create data with Table:
Form the interpolation:
Plot the interpolated function:
Create a list of multidimensional data:
Create an approximate interpolating function:
Plot the interpolating function:
Create data including derivative values:
Construct an interpolation:
Plot the interpolation:
Create 2D data that includes a gradient vector at each point:
Compare with data that does not include gradients:
Also include tensors of second derivatives:
Make a 0^(th)-order interpolation:
Make a linear interpolation:
Make a quadratic interpolation:
Make an interpolation linear in the first dimension and quadratic in the second:
Compare splines with piecewise Hermite interpolation for random data:
The curves appear close, but the spline has a continuous derivative:
Make an interpolating function that repeats periodically:
Make an interpolating function that repeats periodically in the second dimension only:
The interpolating function always goes through the data points:
Find the integral of an interpolating function:
Plot the interpolating function and its integral:
Find a root of the integral:
Beyond the domain defined by the original data extrapolation is used:
A plot shows the inaccuracy of extrapolation:
With the default choice of order, at least 4 points are needed in each dimension:
With a lower order, fewer points are needed:
The interpolation function will always be continuous, but may not be differentiable:
If derivatives are specified, the interpolation function will have a continuous ^(th) derivative:
New in 3 | Last modified in 7