1D to 2D interpolation
4 次查看(过去 30 天)
显示 更早的评论
I would like to know how griddata operate. I would like to scatter 2D points to a 3D grid using the griddata interpolate. The code which brings some errors.
x=1:1:10;
y=11:1:20;
z= sqrt(x.^2+y.^2)
[xx,yy] = meshgrid(linspace(min(x),max(x),200),linspace(min(y),max(y),200))
zz=griddata(x,y,z,xx,yy,'nearest')
The error is as seen below.
Warning: The underlying triangulation is empty - the points may be collinear.
> In griddata>useScatteredInterp (line 183)
In griddata (line 120)
zz =
[]
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!