ListInterpolation
ListInterpolation[array]
constructs an InterpolatingFunction object that 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.
Details and Options
- 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 that returns values with the same precision as those in {array,domain}.
- ListInterpolation supports a Method option. Possible settings include "Spline" for spline interpolation and "Hermite" for Hermite interpolation.
Examples
open allclose allBasic Examples (3)
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:
Scope (4)
Interpolate between points at arbitrary x values:
The x values may be included in the data directly:
Create data with Table:
Plot the interpolated function:
Create a list of multidimensional data:
Generalizations & Extensions (3)
Options (7)
InterpolationOrder (4)
Method (1)
Properties & Relations (2)
Possible Issues (4)
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 derivative:
Text
Wolfram Research (1996), ListInterpolation, Wolfram Language function, https://reference.wolfram.com/language/ref/ListInterpolation.html (updated 2008).
CMS
Wolfram Language. 1996. "ListInterpolation." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2008. https://reference.wolfram.com/language/ref/ListInterpolation.html.
APA
Wolfram Language. (1996). ListInterpolation. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ListInterpolation.html