- 积分
- 26283
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-6-1
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
matlab根据点插值后,删除指点距离之外的值。有点类似制作buffer。xpt = 1000*rand(28,1)+1000;
ypt = 1000*rand(28,1);
zpt = 1200+100*sin(xpt/100)-50*cos(ypt/150);
% Create a surface from the elevation measurements:
[X,Y,Z] = griddata(xpt,ypt,zpt,1000:2:2000,(1000:-2:0)');
% Plot your original surface and observational data points:
figure('position',[100 100 1000 400])
subplot(1,2,1)
pcolor(X,Y,Z)
colormap(autumn(256))
shading interp
cb = colorbar;
ylabel(cb,'surface elevation (m)')
axis equal
hold on
plot(xpt,ypt,'b*','markersize',12)
title('complete surface')
Z2 = replacefartherthan(X,Y,Z,xpt,ypt,100);
subplot(1,2,2)
pcolor(X,Y,Z2)
colormap(autumn(256))
shading interp
cb = colorbar;
ylabel(cb,'surface elevation (m)')
axis equal
hold on
plot(xpt,ypt,'b*','markersize',12)
title('surface w/ points >150 m from obs. removed.')
replacefartherthan.m
(3.4 KB, 下载次数: 6)
|
评分
-
查看全部评分
|