|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
用Matlab画三维地形图
. O. o5 m& H, J, C# e9 K, Z4 n- Y1 E0 O a" e
代码如下:
$ c% V p8 I# r+ I7 }" o6 ^%%%%—————Code to draw 3D bathymetry——————————
5 P z+ ^- _ {6 K8 F%-------Created by 猛牛,May 14,2012--------------------
6 ^7 C7 s( i/ V6 R+ Rclear;clf;clc;
/ O4 f$ v) ~7 q! }3 sncload data_bathymetry.cdf
, f* m# ]* m0 Q: z6 l/ T1 o2 od_elev=elev(709:901,1441:1597); % Luzon Strait
m" s, Q; ~( ?# ]/ }2 Q8 y. ulon=X(1441:1597);/ c9 T; L& C: B% ?' q+ h
lat=Y(709:901);
9 p' q8 {' G" S6 V# F( W[xx,yy]=meshgrid(lon,lat);
/ s! y- Q: b; p/ P: |% q%---------------------------------------------8 ~' H4 O- T* ]) D& q3 P# _1 G7 w
view([10 -10 55])
5 L8 h3 _( z! V$ s) r/ c6 W; Ohold on
4 w/ ]8 w0 m9 y) o! u" xsuRF(xx,yy,d_elev);/ d. {7 q a: s6 W. K/ k
shading interp
& }* p$ d& {$ M& @6 Jaxis([120 135 14 31 -7000 900])
8 a( F- u7 @9 Q1 h, B* A# _ ~5 W: p4 U+ Wxlabel('Longitude','FontSize',16);+ h+ H# A! ]0 l+ ^
ylabel('Latitude','FontSize',16);
: E+ G5 j2 X) s& x0 @# Qzlabel('Elevation(m)','FontSize',16);
" w. Q; e$ Y2 A+ Y+ J/ ]) M wh=colorbar('v');
; n) t! s& A5 Mcaxis([-7000 3000]);6 E% Y( ?% @" a$ I. O9 ^
set(get(h,'ylabel'),'string','Elevation(m)','fontsize',21);
+ Z3 R# n* L8 R. h% dtext(118,22,1000,'Taiwan Island','color','k','fontsize',16,'fontweight','bold');/ n0 x& x& |6 v- F: X3 W1 s
text(118,19,0,'Luzon Strait','color','k','fontsize',16,'fontweight','bold');
- p; }: Z5 h3 {* ~text(118,16,100,'Luzon Island','color','k','fontsize',16,'fontweight','bold');* H8 z! X0 E$ t4 }3 J
title('Bathymetry of Luzon Strait','FontSize',31,'fontweight','bold');3 r" V- Y1 V8 @: K9 T" L% \
|
|