- 积分
- 26254
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-6-1
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
我以前发了一个帖子,如下:
- http://bbs.06climate.com/forum.php?mod=viewthread&tid=14976
复制代码 以前只是觉得这个图画的很好看,但是需要四维数据。
现在奉上相关代码,供大家参考学习,并在此基础上讨论继续学习:
clc;clear
Hstep=0:0.01:20;
Lat=54.5:-1:18.5;
Lon=70.5:1:139.5;
Lon_disp=70:139;
Height=20;
HLevel=length(Hstep);
[x,y,z] = meshgrid(Lon,Lat,Hstep);
v = x.*exp(-x.^2-y.^2-z.^2);
xslice = 100; yslice = []; zslice = [];
slice(x,y,z,v,xslice,yslice,zslice)
colormap(jet(33));
AZ = -15.5, EL = 70
view(AZ,EL)
% axis square
guojie=shaperead('F:\数据收集\基础地理信息数据\Map\bou2_4p.shp');%读取国界shp文件的内容-省界面文件
D=guojie
index=D(1).X>=70 & D(1).X<=139 & D(1).Y>=18 & D(1).Y<=55;
cx=D(1).X(index);
cy=D(1).Y(index);
for i=2:length(D)
clear index
cy(end+1)=NaN;
cx(end+1)=NaN;
index=D(i).X>=70 & D(i).X<=139 & D(i).Y>=18 & D(i).Y<=55;
cx(end+1:end+sum(index))=D(i).X(index);
cy(end+1:end+sum(index))=D(i).Y(index);
end
cz=zeros(1,length(cy));
% load china.mat
hold on
plot3(cx,cy,cz,'-k','linewidth',1.2);
hold on;
|
评分
-
查看全部评分
|