资源描述:
《图形的隐藏属性.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、图形的隐藏属性functionshili20h0=figure('toolbar','none',...'position',[200150450300],...'name','实例20');subplot(1,2,1)[x,y,z]=sphere(10);mesh(x,y,z)axisofftitle('Figure1:Opaque')hiddenonsubplot(1,2,2)[x,y,z]=sphere(10);mesh(x,y,z)axisofftitle('Figure2:Transparent')hiddenoff21PEAKS函数曲线functionshili21h0
2、=figure('toolbar','none',...'position',[200100450450],...'name','实例21');[x,y,z]=peaks(30);subplot(2,1,1)x=x(1,:);y=y(:,1);i=find(y>0.8&y<1.2);j=find(x>-0.6&x<0.5);z(i,j)=nan*z(i,j);surfc(x,y,z)xlabel('X轴');ylabel('Y轴');zlabel('Z轴');title('Figure1:surfc函数形成的曲面')subplot(2,1,2)x=x(1,:);y=y(:,1);i
3、=find(y>0.8&y<1.2);j=find(x>-0.6&x<0.5);z(i,j)=nan*z(i,j);surfl(x,y,z)xlabel('X轴');ylabel('Y轴');zlabel('Z轴');title('Figure2:surfl函数形成的曲面')片状图functionshili22h0=figure('toolbar','none',...'position',[200150550350],...'name','实例22');subplot(1,2,1)x=rand(1,20);y=rand(1,20);z=peaks(x,y*pi);t=delaun
4、ay(x,y);trimesh(t,x,y,z)hiddenofftitle('Figure1:TriangularSurfacePlot');subplot(1,2,2)x=rand(1,20);y=rand(1,20);z=peaks(x,y*pi);t=delaunay(x,y);trisurf(t,x,y,z)title('Figure1:TriangularSurfacePlot');视角的调整functionshili23h0=figure('toolbar','none',...'position',[200150450350],...'name','实例23');x
5、=-5:0.5:5;[x,y]=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,
6、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)向量场的绘制functionshili24h0=figure('toolbar','none',...'position',[200150450350],...'name','实例24');subplot(2,2,1)z=pea
7、ks;ribbon(z)title('Figure1')subplot(2,2,2)[x,y,z]=peaks(15);[dx,dy]=gradient(z,0.5,0.5);contour(x,y,z,10)holdonquiver(x,y,dx,dy)holdofftitle('Figure2')subplot(2,2,3)[x,y,z]=peaks(15);[nx,ny,nz]=surfnorm(x,y,z);surf(x,y,z)holdonquiver3(x