# Scattered Data Interpolation and Approximation 1.0

OS : Windows / Linux / Mac OS / BSD / Solaris
Script Licensing : Freeware
Created : Aug 17, 2007
Thank you for voting...

## Radial base functions (RBF) can be used for ...

radial_base_functions (RBF) can be used for interpolation and and approximation of scattered data i. e. data is not required to be on any regular grid. The same function can handle data interpolation in any dimension. See file rbf. m for more examples.
1. Create RBF interpolation using
rbf=rbfcreate(x, f); ? x? ? coordinates of the nodes and ? f? - values of the function at the nodes
2. Calculate interpolated values ? fi? at nodes ? xi? using
fi = rbfinterp(xi, rbf); rbf ? is structure returned by rbf=rbfcreate(x, f)
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);
- 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: