《matlab编程英文版(Stephen_J_Chapman_)课后答案7.pdf》由会员分享,可在线阅读,更多相关《matlab编程英文版(Stephen_J_Chapman_)课后答案7.pdf(5页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、MATLAB MATLAB Programming for MATLAB Programming for EngineeEnginees s 姓名姓名:户桂民 学号学号:06030229 班级:班级:0290601 日期日期:2008/03/24 -2-One:objectives 1.Help the students to became more familiar with MATLAB tools.2.Put what the students have learned into practice.Two:contents 1.Question:The distance traveled
2、 by a ball falling in the air is given by the equation x=x0+v0t+1/2at2 Use MATLAB to calculate the position of the ball at time t=5s if x0=10m,v0=15m/s2,and a=-9.81m/sec2 Conmand lines and results t=5;x0=10;v0=15;a=-9.81;x=x0+v0*t+1/2*a*t2 x=-37.6250 2.Question:Suppose that x=3 and y=4.Use MATLAB to
3、 evaluate the following -3-expression:x2y3/(x-y)2 Conmand lines and results x=3;y=4;s=x2*y3/(x-y)2 s=576 3.Question:The following MATLAB statements plot the function y(x)=2*e-0.2xfor the range 0 x10.x=0:0.1:10;y=2*exp(-0.2*x);plot(x,y);Use the MATLAB Edit WINDOWS o create a new empty M-File,type the
4、se statements into the file,and save the file with the name test1.m.Then,execute the program by typing the name test1 in the Command Windows.What result do you get?Command line and results:%Create a M-file named test1.m using the following cammand lines x=0:0.1:10;y=2*exp(-0.2*x);-4-plot(x,y);test1
5、4.Question:Suppose that u=1 and v=3.Evaluate the following expressions using MATLAB.a.4u/(3v)b.2v-2/(u+v)2 c.v3/v3-u3 d.4/3v2 command lines and results:a=4*u/(3*v)a=0.4444 -5-b=2*v(-2)/(u+v)2 b=0.0139 c=v3/(v3-u3)c=1.0385 d=4/3*pi*v2 d=37.6991 Three:Experience 1.The experience of the frist experimen
6、t:The experiments our school prepared for us are not enough,we shoold do more exercises in our free time.2.My opinoin about our class:After several weeksclasses,I know that you are very strict with everyone of us.Its useful for our study.However,I think most of us like the lovely and loose class atmosphere.Itjust my personal opinion,if I write something hurt you,please forgive me.