interpolate on a sparse - incomplete - non-square grid

3 次查看(过去 30 天)
I have some data in the form of a vector (xi,yi,Fi,Gi) where F and G are two-dimensional functions of x and y.
However, the {xi,yi} set do NOT form a grid: ie for some values of x there are more y values where I know F and G e.g.
x=[2,2,2,3,3,4,4,4,4,5,5]';
y=[4,5,6,5,6,7,8,9,10,8,10]';
I want to perform some calculations involving x, F and G. Is there a way to perform interpolation to get for example f_int the interpolation of f on a subset of the (x,y) parameter space,_ e.g._ on
x_int=3:.1:4;
y_int=5:.1:10;
However it seems that interp2 would not work because the (xi,yi) are not monotonously ordered...

回答(1 个)

Matt J
Matt J 2012-10-8
See TriScatterdInterp or griddata.

类别

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