Interpolating scattered data within a shapefile/worldmap
古いコメントを表示
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.
回答 (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 件のコメント
darova
2020 年 3 月 30 日
It's not easy task. Do you have coordinates of each separate region? (black)

darova
2020 年 3 月 30 日
I tried this
worldmap([min(x) max(x)],[min(y) max(y)])
load coast
plotm(lat, long)
hold on
plotm(x,y,'.g')
hold off
Looks like you don't have enough data for color

darova
2020 年 3 月 30 日
Or scatter
scatterm(x,y,10,z,'fill')

SChow
2020 年 3 月 30 日
darova
2020 年 3 月 30 日
You don't have points for RUssia and Mexico
SChow
2020 年 3 月 31 日
カテゴリ
ヘルプ センター および File Exchange で Interpolation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!