필터 지우기
필터 지우기

Bicubic Interpolation on Scattered Data

조회 수: 4 (최근 30일)
Prakhar
Prakhar 2012년 12월 5일
Hi Guys
I was wondering if there is a way to do bicubic interpolation on a scattered data set (2d)? I did some online search and figured out that bicubic patches (not sure what are these) needs to fitted on scattered data. Not sure how to proceed from here. Any help will be appreciated!
Note: I understand that Matlab recommends TriScatteredInterp and griddata to interpolate on scattered points. However, TriScatteredInterp is a triangulation interpolation and does not uses splines to interpolate the data.
The data which i have looks something like this:
x = [0 0 0 0 0.28 0.28 0.28 0.28 -0.28 0.28 -0.28 -0.28 -0.988 -0.988 -0.988 -0.988 -0.708 -0.708 -0.708 -0.708 -1.268 -1.268 -1.268 -1.268 0.988 0.988 0.988 0.988 1.268 1.268 1.268 1.268 0.708 0.708 0.708 0.708]
y = [0.9993 0.8113 0.6233 0.4353 0.9373 0.7493 0.5613 0.3733 0.8733 0.6853 0.4973 0.3093 0.9993 0.8113 0.6233 0.4353 0.9373 0.7493 0.5613 0.3733 0.8733 0.6853 0.4973 0.3093 0.9993 0.8113 0.6233 0.4353 0.9373 0.7493 0.5613 0.3733 0.8733 0.6853 0.4973 0.3093]
val = [0.25 0.35 0.19 0.14 0.19 -0.45 -0.96 0.61 0.19 0.20 0.22 0.38 0.15 0.51 0.53 0.68 0.36 0.21 0.52 0.70 0.14 0.34 0.45 0.63 0.25 0.40 0.76 0.65 0.82 0.37 0.49 0.57 0.10 0.11 0.61 0.65]
Thanks!!
Prakhar

답변 (1개)

Teja Muppirala
Teja Muppirala 2012년 12월 5일
Do you have the Curve Fitting Toolbox installed? That does support 3rd order interpolation from scattered data points:
F = fit([x(:),y(:)],val(:),'cubicinterp');
plot(F);
hold on;
scatter3(x,y,val);
% You can also evaluate F at arbitrary points (but you cannot extrapolate outside the region of the points)
F(0.5, 0.6)
F(x,y)

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by