|
SOLUTIONS
|
Mathematica
>
Data Manipulation
>
Numerical Data
>
Curve Fitting & Approximate Functions
>
InterpolatingFunction
BUILT-IN MATHEMATICA SYMBOL
InterpolatingFunction
InterpolatingFunction[domain, table]
represents an approximate function whose values are found by interpolation.
DetailsDetails
- InterpolatingFunction works like Function.
- InterpolatingFunction[...][x] finds the value of an approximate function with a particular argument x.
- In standard output format, only the domain element of an InterpolatingFunction object is printed explicitly. The remaining elements are indicated by
. » - domain specifies the domain of the data from which the InterpolatingFunction was constructed.
- If you supply arguments outside of the domain, a warning is generated, and then an extrapolated value is returned.
- InterpolatingFunction objects that take any number of real arguments may be constructed.
- You can take derivatives of InterpolatingFunction objects using D and Derivative.
- NDSolve returns its results in terms of InterpolatingFunction objects.
ExamplesExamplesopen allclose all
Basic Examples (2)Basic Examples (2)
Make an InterpolatingFunction object that will go through the given points:
| In[1]:= |
Only the domain is shown in standard output format:
| In[2]:= |
| Out[2]= |
Evaluate the function at a point in the domain:
| In[3]:= |
| Out[3]= |
Plot the function over its domain, showing the interpolation points:
| In[4]:= |
| Out[4]= | ![]() |
Get an InterpolatingFunction object approximating the solution of a differential equation:
| In[1]:= |
| Out[1]= |
Plot the function and its derivative:
| In[2]:= |
| Out[2]= | ![]() |
Find the indefinite integral of the solution:
| In[3]:= |
| Out[3]= |
| In[4]:= |
| Out[4]= | ![]() |
New in 2 | Last modified in 3
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »



