Interpolation
RadialBasisFunctionInterpolation
interpolate N-D scattered data using the radial basis function interpolation method
Calling Sequence
Parameters
Description
Examples
Compatibility
RadialBasisFunctionInterpolation(points,values)
RadialBasisFunctionInterpolation(points,values,rbf,c)
f:=RadialBasisFunctionInterpolation(...)
f(x1,...,xn)
f(M)
points
-
listlist, Array, Matrix, Vector, or list of m n-dimensional sample points where each inner list or row represents one point. For a Vector or plain list, n is 1.
values
list, Array, or Vector of sample values
rbf
(optional) the radial basis function to be used; the default is multiquadric
c
(optional) the shape parameter for gaussian, inversequadratic, multiquadric, and inversemultiquadric radial basis functions; the default is 0.5
x1,...,xn
evaluate f at (x1,...,xn)
M
a k x n Matrix of points at which to evaluate f
The RadialBasisFunctionInterpolation command creates a function f⁡x1,...,xn=value which can then be evaluated at arbitrary points in Rn.
The supported radial basis functions are gaussian, inversequadratic, multiquadric, inversemultiquadric, linear, cubic, and thinplatespline. The default is multiquadric.
Using gaussian, inversequadratic, multiquadric, or inversemultiquadric radial basis function results in a C∞ interpolant.
Using linear, cubic, or thinplatespline radial basis function gives a piecewise smooth interpolant.
This interpolation method can introduce local minima or maxima beyond the minimum or maximum sample value.
The shape parameter c can take any nonzero real value. However, the effects of any c and -c are the same.
Numerical errors may be large if c is very close to 0 or is very big. The default value of c is 12.
f can be evaluated at every point in Rn, but results for points far away from the sample points may not be meaningful.
As with all interpolation methods, the interpolant f always passes through all of the sample values.
Input sample points must not contain duplicates. The presence of duplicate points can lead to unexpected results.
The interpolant is a linear combination of radial basis functions centered at each point in points, with the coefficients chosen so that the result is an interpolant. More precisely, the interpolant is of the form f⁡x=∑i⁡αi⁢φc⁡x−xi, where xi iterates over the points in points, φc⁡r is determined by the rbf argument and explained in the table below, and the coefficients α__i are chosen so that f⁡xi=yi, where y__i is the ith entry of values.
Each radial basis function takes the form φcr where r=x-xⅈ, x is a query point, and xⅈ is a sample point.
The following table illustrates the form of each radial basis function.
Radial Basis Function
φcr
gaussian
ⅇ−c⁢r2
inverse quadratic
11+c⁢r2
inverse multiquadric
multiquadric
1+c⁢r2
linear
r
cubic
r3
thin plate spline
r2⁢lnr
In order to evaluate f at k points, you can put each point in a row of a Matrix M and call f(M) to obtain the k values of f in a k-element Vector. This will be most efficient if M's options are such that its datatype is float[8], its order is C_order, and its storage is rectangular.
XY≔0,0,1,0,2,0,0,1,1,1,2,1,0,2,1,2,2,2
Z≔0,0,0,0,1,0,0,0,0
f≔Interpolation:-RadialBasisFunctionInterpolation⁡XY,Z
f≔Raⅆⅈal Basⅈs Functⅈon ⅈntⅇrpolatⅈon obȷⅇct wⅈth 9 samplⅇ poⅈntsRaⅆⅈal Basⅈs Functⅈon: multⅈquaⅆrⅈc
f can be polled at specific points.
f⁡0.5,0.5
0.454268623296997021
M≔Matrix⁡1.5,0.3,0.7,1.4,1.2,1.8,datatype=float8,order=C_order
M≔1.500000000000000.3000000000000000.7000000000000001.400000000000001.200000000000001.80000000000000
f⁡M
0.2799160111515560.6858028703618120.257913080621464
Use plot3d to plot the interpolated surface.
plot3d⁡x,y↦f⁡x,y,0..2,0..2,labels=x,y,z
The Interpolation[RadialBasisFunctionInterpolation] command was introduced in Maple 2018.
For more information on Maple 2018 changes, see Updates in Maple 2018.
See Also
Download Help Document