Home » Source Code » Matlab Radial Interpolation Method

Matlab Radial Interpolation Method

2013-10-30 23:30:21
The author
Download(s): 1
Point (s): 1 
Category Category:
MatlabMatlab MatlabMatlab


This Matlab code provides the radial interpolation methods for multi-dimensional scattered data. The interpolation methods is best used for radial basis function whose values depend only on the distances of the input variables to the origin. An example of the use of the code is shown below.

%1D example
x = 0:1.25:10; f = sin(x);
xi = 0:.1:10;

%Matlab interpolation
fi = interp1(x,f,xi);

% RBF interpolation
rbf=rbfcreate(x, f);
fi = rbfinterp(xi, rbf);

%2D example
x = rand(50,1)*4-2; y = rand(50,1)*4-2; z = x.*exp(-x.^2-y.^2);

ti = -2:.05:2;
[XI,YI] = meshgrid(ti,ti);

%Matlab interpolation
ZI = griddata(x,y,z,XI,YI,'cubic');

%RBF interpolation
rbf=rbfcreate([x'; y'], z');
ZI = rbfinterp([XI(:)'; YI(:)'], op);
ZI = reshape(ZI, size(XI));

Optional parameters:

1. Radial Base Function:
rbfcreate(x, f ,'RBFFunction', 'multiquadric');
available RBF functions are: multiquadric, gaussian, linear, cubic, thinplate
2. Smoothing level: (must be a positive scalar)
rbfcreate(x, f ,'RBFSmooth', 0.1);
3. Multiquadric and gaussian functions have definable constants
rbfcreate(x, f ,?RBFConstant', 0.1);

Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
rbfinterp.m923.00 B2012-06-08 10:44
rbfcheck.m345.00 B2012-06-04 16:47
rbfcreate.m5.59 kB2012-06-05 18:16
Sponsored links


(Add your comment, get 0.1 Point)
Minimum:15 words, Maximum:160 words
  • 1
  • Page 1
  • Total 1

Matlab Radial Interpolation Method (2.88 kB)

Need 1 Point(s)
Your Point (s)

Your Point isn't enough.

Get 22 Point immediately by PayPal

Point will be added to your account automatically after the transaction.

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more Points


Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com


CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D