Bicubic Interpolation on Scattered Data

6 次查看(过去 30 天)
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