|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
用Matlab画三维地形图
8 c% q1 x; i0 Q" h6 Q- e" V D8 N8 S5 r" D* D7 ?' c
代码如下:
$ \) @( i. e5 D4 R8 H' e- p* _( g+ v%%%%—————Code to draw 3D bathymetry——————————, c' y) P* U- Q& ?; U
%-------Created by 猛牛,May 14,2012--------------------
* |$ e4 f2 z# `* }7 cclear;clf;clc;9 u/ L1 E; v, [( ]2 q
ncload data_bathymetry.cdf7 e3 C2 w3 p3 p
d_elev=elev(709:901,1441:1597); % Luzon Strait1 A- @: K* v, p
lon=X(1441:1597);& q) g1 S& T4 w2 {% c, `: ~
lat=Y(709:901);+ Q h7 V5 _( [2 a+ w
[xx,yy]=meshgrid(lon,lat);
8 t3 H, i( I4 B1 b$ i%---------------------------------------------
/ X( w! Z: ]; mview([10 -10 55])
X0 K) g; Y, N! c. g; ~7 s6 Ihold on
/ u1 K0 J" w3 u! w0 D# a4 b6 {. i7 bsuRF(xx,yy,d_elev);
: Q" o$ ]. U% A! V( o3 ?shading interp. h& H0 u* p1 B! n
axis([120 135 14 31 -7000 900])6 B) s: d, C. k& F6 k
xlabel('Longitude','FontSize',16);
6 J3 w0 ~0 I4 {0 C% {$ oylabel('Latitude','FontSize',16);+ i3 m4 b; ^8 b! i( W+ ]& g
zlabel('Elevation(m)','FontSize',16);
5 Z- q1 J$ Q' d d* ?2 {h=colorbar('v');
% S J- S- N2 p4 Tcaxis([-7000 3000]);
! l3 h# E' O" \, sset(get(h,'ylabel'),'string','Elevation(m)','fontsize',21); W# `1 Z) m5 F% |: O: {
text(118,22,1000,'Taiwan Island','color','k','fontsize',16,'fontweight','bold');9 N' h+ r/ T9 I$ |# f
text(118,19,0,'Luzon Strait','color','k','fontsize',16,'fontweight','bold');
3 s" n0 t8 A. }" e; Ptext(118,16,100,'Luzon Island','color','k','fontsize',16,'fontweight','bold');* H. `3 C- N* E8 @( v0 [" L5 t! o
title('Bathymetry of Luzon Strait','FontSize',31,'fontweight','bold');) f5 @: z" ?7 i3 d0 v2 M6 M+ Z5 }
|
|