 RadialBasisFunctionInterpolation - Maple Help

Interpolation

 interpolate N-D scattered data using the radial basis function interpolation method Calling Sequence RadialBasisFunctionInterpolation(points,values) RadialBasisFunctionInterpolation(points,values,rbf,c) f:=RadialBasisFunctionInterpolation(...) f(x1,...,xn) f(M) Parameters

 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 Description

 • The RadialBasisFunctionInterpolation command creates a function $f\left(\mathrm{x1},\mathrm{...},\mathrm{xn}\right)=\mathrm{value}$ which can then be evaluated at arbitrary points in ${R}^{n}$.
 • Using gaussian, inversequadratic, multiquadric, or inversemultiquadric radial basis function results in a ${C}^{\infty }$ 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 $\frac{1}{2}$.
 • f can be evaluated at every point in ${R}^{n}$, 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\left(\mathbit{x}\right)=\sum _{i}{\mathrm{\alpha }}_{i}{\mathrm{\phi }}_{c}\left(‖\mathbit{x}-{\mathbit{x}}_{i}‖\right)$, where ${\mathbit{x}}_{i}$ iterates over the points in points, ${\mathrm{\phi }}_{c}\left(r\right)$ is determined by the rbf argument and explained in the table below, and the coefficients $\mathrm{α__i}$ are chosen so that $f\left({\mathbit{x}}_{i}\right)={y}_{i}$, where $\mathrm{y__i}$ is the $i$th entry of values.
 • Each radial basis function takes the form ${\mathrm{\phi }}_{c}\left(r\right)$ where $r=‖\mathbit{x}-{\mathbit{x}}_{i}‖$, $\mathbit{x}$ is a query point, and ${\mathbit{x}}_{i}$ is a sample point.
 • The following table illustrates the form of each radial basis function.

 Radial Basis Function ${\mathrm{\phi }}_{c}\left(r\right)$ gaussian ${ⅇ}^{-{\left(cr\right)}^{2}}$ inverse quadratic $\frac{1}{1+{\left(cr\right)}^{2}}$ inverse multiquadric $\frac{1}{\sqrt{1+{\left(cr\right)}^{2}}}$ multiquadric $\sqrt{1+{\left(cr\right)}^{2}}$ linear $r$ cubic ${r}^{3}$ thin plate spline ${r}^{2}\mathrm{ln}\left(r\right)$

 • 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, its order is C_order, and its storage is rectangular. Examples

 > $\mathrm{XY}≔\left[\left[0,0\right],\left[1,0\right],\left[2,0\right],\left[0,1\right],\left[1,1\right],\left[2,1\right],\left[0,2\right],\left[1,2\right],\left[2,2\right]\right]$
 ${\mathrm{XY}}{≔}\left[\left[{0}{,}{0}\right]{,}\left[{1}{,}{0}\right]{,}\left[{2}{,}{0}\right]{,}\left[{0}{,}{1}\right]{,}\left[{1}{,}{1}\right]{,}\left[{2}{,}{1}\right]{,}\left[{0}{,}{2}\right]{,}\left[{1}{,}{2}\right]{,}\left[{2}{,}{2}\right]\right]$ (1)
 > $Z≔\left[0,0,0,0,1,0,0,0,0\right]$
 ${Z}{≔}\left[{0}{,}{0}{,}{0}{,}{0}{,}{1}{,}{0}{,}{0}{,}{0}{,}{0}\right]$ (2)
 > $f≔\mathrm{Interpolation}:-\mathrm{RadialBasisFunctionInterpolation}\left(\mathrm{XY},Z\right)$
 ${f}{≔}\left(\begin{array}{c}{Raⅆial Basis Function intⅇrpolation obȷⅇct with 9 samplⅇ points}\\ {Raⅆial Basis Function: multiquaⅆric}\end{array}\right)$ (3)

f can be polled at specific points.

 > $f\left(0.5,0.5\right)$
 ${0.454268623296982810}$ (4)
 > $M≔\mathrm{Matrix}\left(\left[\left[1.5,0.3\right],\left[0.7,1.4\right],\left[1.2,1.8\right]\right],\mathrm{datatype}=\mathrm{float}\left[8\right],\mathrm{order}=\mathrm{C_order}\right)$
 ${M}{≔}\left[\begin{array}{cc}{1.50000000000000}& {0.300000000000000}\\ {0.700000000000000}& {1.40000000000000}\\ {1.20000000000000}& {1.80000000000000}\end{array}\right]$ (5)
 > $f\left(M\right)$
 $\left[\begin{array}{c}{0.279916011151627}\\ {0.685802870361854}\\ {0.257913080621478}\end{array}\right]$ (6)

Use plot3d to plot the interpolated surface.

 > $\mathrm{plot3d}\left(\left(x,y\right)↦f\left(x,y\right),0..2,0..2,\mathrm{labels}=\left[x,y,z\right]\right)$  Compatibility

 • The Interpolation[RadialBasisFunctionInterpolation] command was introduced in Maple 2018.