收藏 分享(赏)

08级电信 刘悦 matlab大作业.doc

上传人:jinchen 文档编号:6328052 上传时间:2019-04-07 格式:DOC 页数:11 大小:280KB
下载 相关 举报
08级电信 刘悦 matlab大作业.doc_第1页
第1页 / 共11页
08级电信 刘悦 matlab大作业.doc_第2页
第2页 / 共11页
08级电信 刘悦 matlab大作业.doc_第3页
第3页 / 共11页
08级电信 刘悦 matlab大作业.doc_第4页
第4页 / 共11页
08级电信 刘悦 matlab大作业.doc_第5页
第5页 / 共11页
点击查看更多>>
资源描述

1、MALTAB 大作业课程名称:MATLAB 在工程中的应用班级: 08 电信 姓名: 刘悦 学号: 12884010 1. 翻译一段 MATLAB 的英文帮助文档(英文字符不少于 1500 字符) ,要求写出英文原文和译文。MATLAB Function Reference view Viewpoint specification Syntaxview(az,el)view(az,el)view(x,y,z)view(2)view(3)view(T)az,el = viewT = viewDescriptionThe position of the viewer (the viewpoint)

2、 determines the orientation of the axes. You specify the viewpoint in terms of azimuth and elevation, or by a point in three-dimensional space. view(az,el) and view(az,el) set the viewing angle for a three-dimensional plot. The azimuth, az, is the horizontal rotation about the z-axis as measured in

3、degrees from the negative y-axis. Positive values indicate counter clockwise rotation of the viewpoint. el is the vertical elevation of the viewpoint in degrees. Positive values of elevation correspond to moving above the object; negative values correspond to moving below the object. view(x,y,z) set

4、s the viewpoint to the Cartesian coordinates x, y, and z. The magnitude of (x,y,z) is ignored. view(2) sets the default two-dimensional view, az = 0, el = 90. view(3) sets the default three-dimensional view, az = -37.5, el = 30. view(T) sets the view according to the transformation matrix T, which i

5、s a 4-by-4 matrix such as a perspective transformation generated by viewmtx. az,el = view returns the current azimuth and elevation. T = view returns the current 4-by-4 transformation matrix. RemarksAzimuth is a polar angle in the x-y plane, with positive angles indicating counterclockwise rotation

6、of the viewpoint. Elevation is the angle above (positive angle) or below (negative angle) the x-y plane. This diagram illustrates the coordinate system. The arrows indicate positive directions. ExamplesView the object from directly overhead. az = 0;el = 90;view(az, el);Set the view along the y-axis,

7、 with the x-axis extending horizontally and the z-axis extending vertically in the figure. view(0 0);Rotate the view about the z-axis by 180. az = 180;el = 90;view(az, el);See Alsoviewmtx, hgtransform, rotate3d Controlling the Camera Viewpoint for related functions Axes graphics object properties Ca

8、mera Position, CameraTarget, CameraViewAngle, Projection Defining the View for more information on viewing concepts and techniques Transforming Objects for information on moving and scaling objects in groups. vertcat viewmtx 1994-2005 The MathWorks, Inc. Terms of Use Patents Trademarks 翻译:Matlab 函数引

9、用 视角视角详述语法描述观察者的位置决定轴线的方向,你指定的视角在方位和高度或者指向三维空间是可以表示出来的,这个方位角 az 从 y 轴负方向看是水平循环的,正的表明相反的,顺时针方向循环,el 是垂直看向高度的角,正的表明符合目标的向上移动,负的表明向下移动.View(x,y,z)为视角 x,y,z 的广义笛卡儿,x,y,z 的大小忽略 .与 z=0 平面所成的方向角称为仰角,与 x=0 平面的夹角叫方位角,如图 7.24 所示。因此默 认的三维视角为仰角 30,方位角 -37.5。默认的二维视角为仰角 90,方位角0。 z y 视点 O 仰角 x 方位角 -y 图 7.24 定义视角 在

10、 MATLAB 中,用函数 view 改变所有类型的图形视角。命令格式为 (1) view(az,el)与 view(az,el) :设置视角的方位角和仰角分别为 az 与el。 (2) view(x,y,z):将视点设为坐标(x,y,z) 。 (3) view(2):设置为默认的二维视角,az=0, el=90。 (4) view(3):设置为默认的三维视角,az=-37.5,el=30。 (5) view(T):以矩阵 T 设置视角,T 为由函数 viewmtx 生成的 44 矩阵。(6) az,el = view:返回当前视角的方位角和仰角。 (7) T = view:由当前视角生成的

11、44 矩阵 T。 摘要 方位在 x y 平面上相反的正角表明顺时针循环,高度在 x y 平面的上边或下边.这个图表阐明坐标体制,这个箭头表明正方向.举例观察头上的物体方位角零度,仰角九十度.az = 0;el = 90;view(az, el);放在 y 坐标轴上 x 轴水平轴垂直的描述出来. view(0 0);关于 z 轴循环 180 度az = 180;el = 90;view(az, el);同样:视角是与控制照相机的视角函数有关,推测视角的定义不在视角的概念上,而在轴线和照相机的位置有关,照相机高,视角成像不同,改变目标的信息在于移动和缩放比例,你指定的视角在于方位角和高度的关系上或

12、指向三维空间.2. 根据自己所学专业和兴趣,自行设计一个 MATLAB 仿真系统。要求写清设计过程,有完整的源程序。在光照条件下的三维动画的动态显示源程序:x,y,z=sphere(30);surf(x,y,z)light(posi,-3,1,1);shading interp;hold on;plot3(0,1,1,p);text(0,1,1,light);axis(-3,5,-3,7,-10,10)axis off;shading interp;colormap(hot);m=moviein(20);for i=1:20view(-7.5+56*(i-1),45)m(:,i)=getfra

13、me;End设计思想: 建立球体增加光照,原图形保持持续,然后movie(m,2);%建立一个 20 列大矩阵for i=1:20view(-37.5+24*(i-1),30) %改变视点m(:,i)=getframe; %将图形保存到 m 矩阵end movie(m,2); %播放画面 2 次 球的动态旋转就演示成功了!light2.划马鞍面: 源程序:x,y=meshgrid(0:0.25:4*pi);z=-x.4+y.4-x.2-y.2-2.*x.*y;mesh(x,y,z);051015051015-3-2-10123x 1043 画3维曲线的投影t = 0:pi/20:2*pi;su

14、bplot(2,2,1)plot(t,t.*cos(t),-.r*)t = 0:pi/20:2*pi;subplot(2,2,2)plot(exp(t/100).*sin(t-pi/2),-mo)t = 0:pi/20:2*pi;subplot(2,2,3)plot(sin(t-pi),:bP)t = 0:pi/20:2*pi;subplot(2,2,4)plot(t,t.*cos(t),-.r*)hold onplot(exp(t/100).*sin(t-pi/2),-mo)plot(sin(t-pi),:bP)hold off 0 2 4 6 8-505100 20 40 60-2-101

15、20 20 40 60-1-0.500.510 20 40 60-505103. 绘制图形: 231wPRV=1.225;绘制当 R 为 1:10:100 时,在不同 V(0-20)下的曲线。源程序:p=1.225;R=1:10:100;for V=0:20Pw=1/2*p*pi*R.*R*V*V*Vhold on;plot(R,Pw);end;0 10 20 30 40 50 60 70 80 90 10002468101214x 1074. 绘制图形: 5121346CPCe130.5.81到 分别为 0.5176、116、0.4、5、21、0.0068 。1C6绘制不同的 和 值对应的

16、曲线。PC参考图形样式:程序:C1=0.5176;C2=116;C3=0.4;C4=5;C5=21;C6=0.0068;k=0:2:20;for b=0:0.5:12K1=1./(1./(k+0.08.*b)-0.035./(b.*b.*b+1);Cp=C1.*(C2./k-C3.*b-C4).*exp(-C5./K1)+C6.*k;hold on;plot(k,Cp);axis(0 20 -0.1 1 );end;for i=0:0.5:10text(18.4,0.074*i,b=);text(19,0.074*i,num2str(5-i);end;i=4.5;text(18.4,0.09*i,b=);text(19,0.09*i,num2str(5-i);i=5;text(18.4,0.115*i,b=);text(19,0.115*i,num2str(5-i);0 2 4 6 8 10 12 14 16 18 20-0.100.10.20.30.40.50.60.70.80.9b=5b=4.5b=4b=3.5b=3b=2.5b=2b=1.5b=1b=0.5b=0b=-0.5b=-1b=-1.5b=-2b=-2.5b=-3b=-3.5b=-4b=-4.5b=-50.5b=0

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 生活休闲 > 社会民生

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报