ZHANGLIMicrosoftWord文档.doc_第1页
ZHANGLIMicrosoftWord文档.doc_第2页
ZHANGLIMicrosoftWord文档.doc_第3页
ZHANGLIMicrosoftWord文档.doc_第4页
ZHANGLIMicrosoftWord文档.doc_第5页
已阅读5页,还剩2页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

一)熟悉Matlab的运行环境以及HELP命令,运行demo命令,观看matlab所具有的功能。(二)验证例题中所有操作。(三)完成以下各题,将步骤命令写入实验报告,并在机器上运行结果验证。1输入A=7 1 5;2 5 6;3 1 5,B=1 1 1; 2 2 2; 3 3 3,在命令窗口中执行下列表达式,掌握其含义:A(2, 3) A(:,2) A(3,:) A(:,1:2:3) A(:,3).*B(:,2) A(:,3)*B(2,:) A*B A.*B A2 A.2 B/A B./A2输入C=1:2:20,则C(i)表示什么?其中i=1,2,3,10;3查找已创建变量的信息,删除无用的变量;4输入以下程序,察看结果,如果出错给出处理方法并验证。(1)a=magic(3);b=243; (2)a=magic(3);b=243;save myvar a b; save myvar a b ascii;clear; pause;clear;load myvar; load myvar ascii;whoa,b5求下列表达式的值。(1)(2),其中a=3.5,b=5,c=-9.8。6欲通过系统做一平面图,请查找相关的命令与函数,获取函数的帮助信息(三)实验结果: A=7 1 5;2 5 6;3 1 5A = 7 1 5 2 5 6 3 1 5 B=1 1 1;2 2 2;3 3 3B = 1 1 1 2 2 2 3 3 3 A(2,3)ans = 6A(:,2)ans = 1 5 1A(3,:)ans = 3 1 5 A(:,1:2:3)ans = 7 5 2 6 3 5A(:,3).*B(:,2)ans = 5 1215A(:,3)*B(2,:)ans = 10 10 10 12 12 12 10 10 10 A*Bans = 24 24 24 30 30 30 20 20 20 A.*Bans = 7 1 5 4 10 12 9 3 15 A2ans = 66 17 66 42 33 70 38 13 46A.2ans = 49 1 25 4 25 36 9 1 25 B/Aans = 0.1842 0.2105 -0.2368 0.3684 0.4211 -0.4737 0.5526 0.6316 -0.7105B./Aans = 0.1429 1.0000 0.2000 1.0000 0.4000 0.3333 1.0000 3.0000 0.6000 c=1:2:20c = 1 3 5 7 9 11 13 15 17 19 c(1)ans = 1c(10)ans = 193.运行结果:help ans ANS Most recent answer. ANS is the variable created automatically when expressions are not assigned to anything else. ANSwer. help aa.m not found. clear a4 运行结果 (1) magic(3);b=243; save myvar a b; clear; load myvar whoYour variables are:a b (2) a=magic(3);b=243; save myvar a b pause;clear; load myvar5(1) 运行结果:w= sqrt(2)*1+0.34245*10(-6)w =5(2)运行结果: a=3.5;b=5;c=-9.8;x=2*pi*a+(b+c)/(pi+a*b*c)-exp(2)/tan(b+c)+ax = 0.9829 六、运行结果:help bar BAR Bar graph. BAR(X,Y) draws the columns of the M-by-N matrix Y as M groups of N vertical bars. The vector X must be monotonically increasing or decreasing. BAR(Y) uses the default value of X=1:M. For vector inputs, BAR(X,Y) or BAR(Y) draws LENGTH(Y) bars. The colors are set by the colormap. BAR(X,Y,WIDTH) or BAR(Y,WIDTH) specifies the width of the bars. Values of WIDTH 1, produce overlapped bars. The default value is WIDTH=0.8 BAR(.,grouped) produces the default vertical grouped bar chart. BAR(.,stacked) produces a vertical stacked bar chart. BAR(.,LINESPEC) uses the line color specified (one of rgbymckw). H = BAR(.) returns a vector of patch handles. Use SHADING FACETED to put edges on the bars. Use SHADING FLAT to turn them off. Examples: subplot(3,1,1), bar(rand(10,5),stacked), colormap(cool) subplot(3,1,2), bar(0:.25:1,rand(5),1) subplot(3,1,3), bar(rand(2,3),.75,grouped) See also HIST, PLOT, BARH. Overloaded methods help fints/bar.m help pie PIE Pie chart. PIE(X) draws a pie plot of the data in the vector X. The values in X are normalized via X/SUM(X) to determine the area of each slice of pie. If SUM(X) = 1.0, the values in X directly specify the area of the pie slices. Only a partial pie will be drawn if SUM(X) help contour CONTOUR Contour plot. CONTOUR(Z) is a contour plot of matrix Z treating the values in Z as heights above a plane. A contour plot are the level curves of Z for some values V. The values V are chosen automatically. CONTOUR(X,Y,Z) X and Y specify the (x,y) coordinates of the surface as for SURF. CONTOUR(Z,N) and CONTOUR(X,Y,Z,N) draw N contour lines, overriding the automatic value. CONTOUR(Z,V) and CONTOUR(X,Y,Z,V) draw LENGTH(V) contour lines at the values specified in vector V. Use CONTOUR(Z,v v) or CONTOUR(X,Y,Z,v v) to compute a single contour at the level v. C,H = CONTOUR(.) returns contour matrix C as described in CONTOURC and a column vector H of handles to LINE or PATCH objects, one handle per line. Both of these can be used as input to CLABEL. The UserData property of each object contains the height value for each contour. The contours are normally colored based on the current colormap and are drawn as PATCH objects. You can override this behavior with the syntax CONTOUR(.,LINESPEC) to draw the contours as LINE objects with the color and linetype specified. Uses code by R. Pawlowicz to handle paramet

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论