フィルターのクリア

Regular meshgrids in MATLAB

2 ビュー (過去 30 日間)
Kaushal Kishore
Kaushal Kishore 2018 年 8 月 28 日
回答済み: KSSV 2018 年 8 月 28 日
Hi I have created the mesh grid by using
[X,Y]=meshgrid(lon,lat);% code
I want to superimpose the mesh onto the digital elevation model to extract the geographical coordinates of the nodes.
  1 件のコメント
madhan ravi
madhan ravi 2018 年 8 月 28 日
Where is the rest of the code?

サインインしてコメントする。

採用された回答

KSSV
KSSV 2018 年 8 月 28 日
YOu DEM should be having a grid and the respective H values. Use 2D interpolation i.e interp2 to get DEM values at your grid.
Check the below demo code:
[X,Y,Z] = peaks(100) ; % your DEM say
x0 = -2 ; x1 = 2 ; % Want to extract top these limits
y0 = -1 ; y1 = 0 ;
N = 100 ;
x = linspace(x0,x1,N) ;
y = linspace(y0,y1,N) ;
[Xi,Yi] = meshgrid(x,y) ;
Zi = interp2(X,Y,Z,Xi,Yi) ;
subplot(121)
pcolor(X,Y,Z) ; shading interp
subplot(122)
pcolor(Xi,Yi,Zi) ; shading interp ;

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by