Skip to main content
Department of Information Technology

Radial Basis Function Interpolation - RBF-QR

Contributed by Elisabeth Larsson, Julia implementation in 2-D contributed by Fredrik Fryklund

Short description

A MATLAB implementation of the RBF-QR method for radial basis function interpolation in the small shape parameter range.

The technical details of the implementations are described in:

  1. Stable computation of differentiation matrices and scattered node stencils based on Gaussian radial basis functions. Elisabeth Larsson, Erik Lehto, Alfa Heryudono, and Bengt Fornberg. In SIAM Journal on Scientific Computing, volume 35, pp A2096-A2119, 2013. (DOI).
  2. Stable computations with Gaussian radial basis functions. Bengt Fornberg, Elisabeth Larsson, and Natasha Flyer. In SIAM Journal on Scientific Computing, volume 33, pp 869-892, 2011. (DOI).

Program code

Note that in each case, for the basic subroutines RBF_QR_mat_nD.m, the computational domain must be scaled to fall within [-1,1], the unit disc, or the unit sphere. However, the driver routines RBF_QR_diffmat_nD.m perform the appropriate scaling automatically.

MATLAB code for the 1-D case:

  • RBF_QR_diffmat_1D.m: computes differentiation matrices for up to 2nd order derivatives (B\A).
  • RBF_QR_mat_1D.m: computes matrices corresponding to different operators (B or A) (assumes scaled nodes)
  • Init_Psi_1D.m: computes the representation for the RBF-QR basis functions
  • EvalD_1D.m: help routine for the diagonal scaling
  • hypergeom01.m: not the same hypergeometric as for the 2D- and 3D-case
  • RBF_QR_main_1D.m: main program that implements an example
  • All the 1-D files in one zip-file: RBF_QR_1D.zip

MATLAB code for the 2-D case:

  • RBF_QR_diffmat_2D.m: computes differentiation matrices for up to 2nd order derivatives (B\A).
  • RBF_QR_mat_2D.m: computes matrices corresponding to different operators (B or A) (assumes scaled nodes)
  • RBF_QR_parse.m: help routine to decode operators
  • RBF_QR_precomp_2D.m: help routine to compute values that can be reused
  • InitPsi_2D.m: computes the representation for the RBF-QR basis functions
  • IncQR.m: performs incremental QR factorization with selective pivoting
  • EvalD_2D.m: help routine for the diagonal scaling
  • hypergeom12.m: the hypergeometric function used in the 2D-case
  • degree.m: help function for the degree K of a polynomial in d dimensions with N coefficients
  • dim.m: help function for the dimension N of a polynomial of degree K in d dimensions
  • halton.m: computes Halton nodes. Corresponding routine, see haltonseq from MATLAB central file exchange
  • f.m: the test function that is used in the main program
  • RBF_QR_diffmain_2D.m: simple test of RBF_QR_diffmat

Julia code for the 2-D case:

MATLAB code for the 3-D case:

  • RBF_QR_3D.m
  • degree.m: help function for the degree K of a polynomial in d dimensions with N coefficients
  • dim.m: help function for the dimension N of a polynomial of degree K in d dimensions
  • Y.m: help function for spherical harmonics
  • hypergeom3.m: not the same hypergeometric as for the 2D-case
  • RBF_QR_3Dmain.m: the main program uses haltonseq.m, see above

Terms of use

These subroutines may be used freely without permission, but not for commercial purposes. When used for research publications, we kindly ask users to cite and acknowledge the source.

More about our RBF research

RBF group research page

Updated  2022-01-04 10:27:00 by Elisabeth Larsson.