Mathematica > Data Manipulation > Numerical Data > Curve Fitting & Approximate Functions >
Mathematica > Data Manipulation > Statistics > Curve Fitting & Approximate Functions >
Mathematica > Mathematics and Algorithms > Statistics > Curve Fitting & Approximate Functions >

ListInterpolation

Updated In 7 Graphic
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.
  • 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 "Spline" for spline interpolation and "Hermite" for Hermite interpolation.
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 [0,1]:
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]=
New in 3 | Last modified in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team