Interpolating scattered data within a shapefile/worldmap
4 次查看(过去 30 天)
显示 更早的评论
Hi I have x,y,zi scattered data, where x is lon, y is lat and zi is the data, I want to interpolate and extrapolate the data within the land boundaries, I used
vq = griddata(x,y,zi,xi,yi);
However, the interpolation and extrapolation was not made as desired.
2 个评论
回答(1 个)
darova
2020-3-30
Here is my effort. Am i succeeded?
S = importdata('CP_c.csv');
A = S.data;
x = A(:,1);
y = A(:,2);
z = A(:,3);
xx = linspace(min(x),max(x),20);
yy = linspace(min(y),max(y),20);
[X,Y] = meshgrid(xx,yy);
Z = griddata(x,y,z,X,Y);
surf(X,Y,Z)
8 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!