正在加载图片...
在 MATLAB中,函数view改变所有类型的二维和三维图形的图形视角 view(az,e和view(aze将视角改变到所指定的方位角az和仰角el。考虑下面脚本 M文件形式的例子。 viewpoint example using subplots xlinspace(0, 3 pi) z=Isin(x) sin(2*x) sin(2 x)I create y and Z axes as matrices Y=zeros(size(x)) ones(size(x))2 ones(size(x)) subplot(2, 2, 1) lot3(x,, z)% plot works with column-oriented matrices too grd, alabel(x-axis) ylabel(Y-axis‘) alabel(‘Z-axis‘) title( Default Az=-37.5, El=30) iew(-37.5,30) subplot(2, 2, 2) plot(x,Y, 4) grid, xlabel(X-axis) ylabel(‘Y-axis‘), zlabel(‘Z-axis‘) title( az rotated to 52.5) vew(-37.5+90,30) subplot(2, 2, 3) plot(x,Y, Z grid, Xlabel(x-axis‘) ylabel(Y-axis"), zlabel(‘ Z-axis‘) title( el increased to 60) view(-37.5,60) plot(x,Y, Z) grid, xlabel( X-axis), ylabel('Y-axis ') title( Az=0,El=90) w(090)在 MATLAB 中,函数 view 改变所有类型的二维和三维图形的图形视角。 view(az,el)和 view([az,el)]将视角改变到所指定的方位角 az 和仰角 el。考虑下面脚本 M 文件形式的例子。 % viewpoint example using subplots x=linspace(0,3*pi).’; Z=[sin(x) sin(2*x) sin(2*x)]; % create Y and Z axes as matrices Y=[zeros(size(x)) ones(size(x))/2 ones(size(x))]; subplot(2,2,1) plot3(x,Y,Z) % plot3 works with column-oriented matrices too grid,xlabel( ‘ X-axis ‘ ),ylabel( ‘ Y-axis ‘ ),zlabel( ‘ Z-axis ‘ ) title( ‘ Default Az = -37.5,E1 = 30 ‘ ) view(-37.5,30) subplot(2,2,2) plot3(x,Y,Z) grid,xlabel( ‘ X-axis ‘ ),ylabel( ‘ Y-axis ‘ ),zlabel( ‘ Z-axis ‘ ) title( ‘ Az Rotated to 52.5 ‘ ) view(-37.5+90,30) subplot(2,2,3) plot3(x,Y,Z) grid,xlabel( ‘ X-axis ‘ ),ylabel( ‘ Y-axis ‘ ),zlabel( ‘ Z-axis ‘ ) title( ‘ E1 Increased to 60 ‘ ) view(-37.5,60) subplot(2,2,4) plot3(x,Y,Z) grid,xlabel( ‘ X-axis ‘ ),ylabel( ‘ Y-axis ‘ ) title( ‘ Az = 0,E1 = 90 ‘ ) view(0,90)
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有