|
Calling Sequence
|
|
f := Interpolate(points, data)
f := Interpolate(points, data, method, methodargs)
f(x1, ..., xn)
f(pts)
|
|
Parameters
|
|
points
|
-
|
a list, listlist, Array, Vector, or Matrix containing the numeric coordinates of the independent points corresponding to data values. If points is a listlist, each inner list must contain n entries, where n is the dimension of the data. If points is an Array or Matrix, then there must be n columns, with each row corresponding to one point. If points is a list or Vector of numeric values, then n is 1 and each value is a separate point.
|
data
|
-
|
a list, Array, or Vector containing the data, which must be arranged in the same order as the corresponding coordinates appear in points.
|
method
|
-
|
an optional keyword option of the form method=m, where m is one of inversedistanceweighted, lineartriangular, radialbasisfunction, kriging, naturalneighbor, nearest, lowest, highest, linear, cubic, or spline.
|
methodargs
|
-
|
(optional) the same optional arguments available when calling a specific interpolation method are available through this Interpolate command. For details, see the help page for the specific method being used.
|
|
|
|
|
Description
|
|
•
|
The Interpolate command is a general-purpose command used for interpolation. To perform the interpolation, a variety of different methods can be used as specified by the method option. This command will return an interpolation object which can then be used as a procedure, taking the coordinates of a point as parameters and giving the interpolated result as the return value.
|
•
|
The values for the method option correspond to the following interpolation methods, and the supported dimensions for the independent points in points:
|
•
|
The default method is spline if the input points are one-dimensional, naturalneighbor if the input points are two-dimensional, and radialbasisfunction otherwise.
|
•
|
The methods that are listed as supporting only dimension 1, above, do support higher dimensions, but only for independent points that are arranged in a grid. The way such points are then specified is not compatible with the way points are specified for the other commands, so the Interpolate command doesn't support this. However, you can make use of this functionality by calling the corresponding commands (linked in the table above) directly.
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
f can be polled at specific points.
We do the same with a different method. We supply two parameters to this method (explained on the Radial Basis Function Interpolation help page).
>
|
|
| (5) |
Use the plot3d command to plot the interpolated surface.
>
|
|
A 1-dimensional example.
>
|
|
| (7) |
>
|
|
| (8) |
>
|
|
| (9) |
|
|
Compatibility
|
|
•
|
The Interpolation[Interpolate] command was introduced in Maple 2018.
|
|
|
|