This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Built-in Functions / Numerical Computation / Data Manipulation  /
Interpolation

  • Interpolation[ data ] constructs an InterpolatingFunction object which represents an approximate function that interpolates the data.
  • The data can have the forms , , , , ... or , , ... , where in the second case, the are taken to have values 1, 2, ... .
  • Data can be given in the form , , , , ... , ... to specify derivatives as well as values of the function at the points . You can specify different numbers of derivatives at different points.
  • Function values and derivatives may be real or complex numbers, or arbitrary symbolic expressions. The must be real numbers.
  • Multidimensional data can be given in the form , , ... , , ... . Derivatives in this case can be given by replacing and so on by , , , ... .
  • Interpolation works by fitting polynomial curves between successive data points.
  • The degree of the polynomial curves is specified by the option InterpolationOrder.
  • The default setting is InterpolationOrder -> 3.
  • You can do linear interpolation by using the setting InterpolationOrder -> 1.
  • Interpolation[ data ] generates an InterpolatingFunction object which returns values with the same precision as those in data.
  • See the Mathematica book: Section 3.8.2.
  • See also: ListInterpolation, FunctionInterpolation, InterpolatingPolynomial, Fit.
  • Related packages: NumericalMath`SplineFit`, NumericalMath`PolynomialFit`, NumericalMath`Approximations`, DiscreteMath`ComputationalGeometry`.

    Further Examples

    Approximating Sqrt
    Here is a table of values of the square root function at the points .

    In[1]:=

    Out[1]=

    This constructs an approximate function that represents these 11 values on the domain .

    In[2]:=

    Out[2]=

    The values of the function match the data at the given points.

    In[3]:=

    Out[3]=

    The function also gives a fair approximation to the square root function at other points between and .

    In[4]:=

    Out[4]=

    A plot of the difference between the two functions shows that the approximation is better at some points than at others.

    Evaluate the cell to see the graphic.

    In[5]:=

    In[6]:=