Scattered Data Interpolation and Approximation using Radial Base Functions

버전 1.0.0.0 (117 KB) 작성자: Alex Chirokov
Set of functions that can be used for interpolation and and approximation of scattered data of any d
다운로드 수: 14.2K
업데이트 날짜: 2006/10/9

라이선스 없음

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 rbftest.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)

%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);

RBF interpolation usually produces much better results that standard Matlab functions but computation complexity of RBF interpolation is n^3 thus it is not recommended to use it for more then 2000 nodes.

인용 양식

Alex Chirokov (2024). Scattered Data Interpolation and Approximation using Radial Base Functions (https://www.mathworks.com/matlabcentral/fileexchange/10056-scattered-data-interpolation-and-approximation-using-radial-base-functions), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R13
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0

Several users complained about lack of explanations. So I added presentation that explains how to use provided set of functions.