青年梦想家 发表于 2015-7-24 23:55

【奠基经典】MATLAB实用程序案例之视角的调整







视角的调整
实例:
function shili23
h0=figure('toolbar','none',...
'position',,...
'name','实例23');
x=-5:0.5:5;
=meshgrid(x);
r=sqrt(x.^2+y.^2)+eps;
z=sin(r)./r;
subplot(2,2,1)
surf(x,y,z)
xlabel('X-axis')
ylabel('Y-axis')
zlabel('Z-axis')
title('Figure1')
view(-37.5,30)
subplot(2,2,2)
surf(x,y,z)
xlabel('X-axis')
ylabel('Y-axis')
zlabel('Z-axis')
title('Figure2')
view(-37.5+90,30)
subplot(2,2,3)
surf(x,y,z)
xlabel('X-axis')
ylabel('Y-axis')
zlabel('Z-axis')
title('Figure3')
view(-37.5,60)
subplot(2,2,4)
surf(x,y,z)
xlabel('X-axis')
ylabel('Y-axis')
zlabel('Z-axis')
title('Figure4')
view(180,0)

关于本帖内容欢迎大家踊跃讨论,与在下交流!

页: [1]
查看完整版本: 【奠基经典】MATLAB实用程序案例之视角的调整