Interpolation - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Statistics and Data Analysis : Interpolation and Curve Fitting : Interpolation Package : Interpolation/RadialBasisFunctionInterpolation

Interpolation

  

RadialBasisFunctionInterpolation

  

interpolate N-D scattered data using the radial basis function interpolation method

 

Calling Sequence

Parameters

Description

Examples

Compatibility

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 fx1,...,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 fx=iαiφcxxi, where xi iterates over the points in points, φcr is determined by the rbf argument and explained in the table below, and the coefficients α__i are chosen so that fxi=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

ⅇcr2

inverse quadratic

11+cr2

inverse multiquadric

11+cr2

multiquadric

1+cr2

linear

r

cubic

r3

thin plate spline

r2lnr

• 

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.

Examples

XY0,0,1,0,2,0,0,1,1,1,2,1,0,2,1,2,2,2

XY0,0,1,0,2,0,0,1,1,1,2,1,0,2,1,2,2,2

(1)

Z0,0,0,0,1,0,0,0,0

Z0,0,0,0,1,0,0,0,0

(2)

fInterpolation:-RadialBasisFunctionInterpolationXY,Z

fRaⅆⅈ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

(3)

f can be polled at specific points.

f0.5,0.5

0.454268623296954388

(4)

MMatrix1.5,0.3,0.7,1.4,1.2,1.8,datatype=float8,order=C_order

M1.500000000000000.3000000000000000.7000000000000001.400000000000001.200000000000001.80000000000000

(5)

fM

0.2799160111515560.6858028703618260.257913080621449

(6)

Use plot3d to plot the interpolated surface.

plot3dx,yfx,y,0..2,0..2,labels=x,y,z

Compatibility

• 

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

• 

For more information on Maple 2018 changes, see Updates in Maple 2018.

See Also

Interpolation