page_title: Radial basis function interpolation
section_title: Examples
hierarchical_section_title: Radial basis function interpolation / Examples
caption_attribution_description: English: This shows the function f(x)=exp(x*cos(3pix))-1 ploted on the interval [0,1], sampled at n=15 equally spaced points, and interpolated using a gaussian radial basis function with a shape of eps=3.05048.
context_page_description: Radial basis function interpolation is an advanced method in approximation theory for constructing high-order accurate interpolants of unstructured data, possibly in high-dimensional spaces. The interpolant takes the form of a weighted sum of radial basis functions. RBF interpolation is a mesh-free method, meaning the nodes need not lie on a structured grid, and does not require the formation of a mesh. It is often spectrally accurate and stable for large numbers of nodes even in high dimensions.
  Many interpolation methods can be used as the theoretical foundation of algorithms for approximating linear operators, and RBF interpolation is no exception. RBF interpolation has been used to approximate differential operators, integral operators, and surface differential operators. These algorithms have been used to find highly accurate solutions of many differential equations including Navier–Stokes equations, Cahn–Hilliard equation, and the shallow water equations.
context_section_description: Let  and let  be 15 equally spaced points on the interval . We will form  where  is a radial basis function, and choose  such that  ( interpolates  at the chosen points). In matrix notation this can be written as
  Choosing , the Gaussian, with a shape parameter of , we can then solve the matrix equation for the weights and plot the interpolant. Plotting the interpolating function below, we see that it is visually the same everywhere except near the left boundary (an example of Runge's phenomenon), where it is still a very close approximation. More precisely the maximum error is roughly .
caption: The function 
    
      
        
          f
          (
          x
          )
          =
          exp
          ⁡
          (
          x
          cos
          ⁡
          (
          3
          π
          x
          )
          )
          −
          1
        
      
      {\displaystyle f(x)=\exp(x\cos(3\pi x))-1}
    
   sampled at 
    
      
        
          n
          =
          15
        
      
      {\displaystyle n=15}
    
   equally spaced nodes in the unit interval, and interpolated using the Gaussian RBF with a shape parameter of 
    
      
        
          ε
          ≈
          3.05048
        
      
      {\displaystyle \varepsilon \approx 3.05048}
exif: {}