闽_江_学_院_电_子_系.doc_第1页
闽_江_学_院_电_子_系.doc_第2页
闽_江_学_院_电_子_系.doc_第3页
闽_江_学_院_电_子_系.doc_第4页
闽_江_学_院_电_子_系.doc_第5页
已阅读5页,还剩3页未读, 继续免费阅读

下载本文档

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

文档简介

闽 江 学 院 电 子 系实 验 报 告学生姓名:陈燕燕班级:10电本学 号:120101004117课程:MATLAB一、 实验题目:MATLAB操作基础二、 实验地点:实验楼A210三、 实验目的: 1、熟悉MATLAB的操作环境及基本操作方法。2、掌握MATLAB的搜索路径及其设置方法。3、熟悉MATLAB帮助信息的查阅方法。四、实验内容:1、先建立自己的工作目录,再将自己的工作目录设置到MATLAB搜索路径下,再试验用help命令能否查询到自己的工作目录。2、在MATLAB环境下验证例1-1至1-4,并完成以下题目:(1)绘制右图所示图形(2)求 3、利用MATLAB的帮助功能分别查询inv,plot、max、round等函数的功能及用法。4、在工作空间建立一个变量a ,同时在当前目录下建立一个M文件:a.m,试在命令窗口输入a,观察结果,并解释原因。四、 实验结果1. helpHELP topics:E:MATLAB 实验 - (No table of contents file)matlabgeneral - General purpose commands.matlabops - Operators and special characters.matlablang - Programming language constructs.matlabelmat - Elementary matrices and matrix manipulation.matlabelfun - Elementary math functions.matlabspecfun - Specialized math functions.matlabmatfun - Matrix functions - numerical linear algebra.matlabdatafun - Data analysis and Fourier transforms.matlabaudio - Audio support.matlabpolyfun - Interpolation and polynomials.matlabfunfun - Function functions and ODE solvers.matlabsparfun - Sparse matrices.matlabgraph2d - Two dimensional graphs.matlabgraph3d - Three dimensional graphs.matlabspecgraph - Specialized graphs.matlabgraphics - Handle Graphics.matlabuitools - Graphical user interface tools.matlabstrfun - Character strings.matlabiofun - File input/output.matlabtimefun - Time and dates.matlabdatatypes - Data types and structures.matlabverctrl - Version control.matlabwinfun - Windows Operating System Interface Files (DDE/COM)winfuncomcli - (No table of contents file)matlabdemos - Examples and demonstrations.toolboxlocal - Pblksaeroblks - Aerospace Blocksetaeroblksaerodemos - Aerospace Blockset demonstrations and examples.ccslinkccslink - MATLAB Link for Code Composer Studio(tm) ccslinkccsdemos - MATLAB Link for Code Composer Studio (tm) Demosccslinkrtdxblks - RTDX (tm) Blocks combuildercombuilder - MATLAB COM Builder.toolboxcompiler - MATLAB Compilercurvefitcurvefit - Curve Fitting Toolboxcurvefitcftoolgui - (No table of contents file)daqdaq - Data Acquisition Toolbox.daqdaqguis - Data Acquisition Toolbox - Data Acquisition Soft Instruments.daqdaqdemos - Data Acquisition Toolbox - Data Acquisition Demos.databasedatabase - Database Toolbox.databasedbdemos - Database Toolbox Demonstration Functions.databasevqb - Visual Query Builder functions.datafeeddatafeed - Datafeed Toolbox.datafeeddfgui - Datafeed Toolbox Graphical User Interfacetoolboxexlink - Excel Link.toolboxfixpoint - Fixed-Point Blocksetfuzzyfuzzy - Fuzzy Logic Toolbox.fuzzyfuzdemos - Fuzzy Logic Toolbox Demos.identident - System Identification Toolbox.identidobsolete - (No table of contents file)identidguis - (No table of contents file)identidutils - (No table of contents file)identiddemos - (No table of contents file)identidhelp - (No table of contents file)imagesimages - Image Processing Toolbox.imagesimdemos - Image Processing Toolbox - demos and sample imagesinstrumentinstrument - Instrument Control Toolbox.instrumentinstrumentdemos - (No table of contents file)matlabxlmatlabxl - MATLAB Excel Builder.mutoolscommands - Mu-Analysis and Synthesis Toolbox.mutoolssubs - Mu-Analysis and Synthesis Toolbox.toolboxncd - Nonlinear Control Design Blocksetnnetnnet - Neural Network Toolbox.nnetnnutils - (No table of contents file)nnetnncontrol - Neural Network Toolbox Control System Functions.nnetnndemos - Neural Network Demonstrations.nnetnnobsolete - (No table of contents file)toolboxoptim - Optimization Toolboxtoolboxpde - Partial Differential Equation Toolbox.toolboxreqmgt - Requirements Management Interface.toolboxrptgen - MATLAB Report Generatortoolboxruntime - MATLAB Runtime Server Development Kit toolboxsplines - Spline Toolbox.toolboxstats - Statistics Toolboxtoolboxsymbolic - Symbolic Math Toolbox.webserverwebserver - MATLAB Web Server.webserverwsdemos - (No table of contents file)matlab6.5work - (No table of contents file)For more help on directory/topic, type help topic.For command syntax information, type help syntax. 图形如图所示2 。1-1 .绘制正弦曲线和余弦曲线。代码:x=0:0.5:360*pi/180; plot(x,sin(x),x,cos(x);图形如图所示1-2 求方程3x 4+7x 3+9x2-23=0的全部根。代码:p=3,7,9,0,-23; x=roots(p)实验结果:x = -1.8857 -0.7604 + 1.7916i -0.7604 - 1.7916i 1.0732 1-3 求积分xln(1+x)dx.代码:quad(x.*log(1+x),0,1) 实验结果:ans =1/41-4求解线性方程组 2x-3y+z=48x+3y+2z=245x+yy-9z=17 代码:a=2,-3,1;8,3,2;45,1,-9; b =4;2;17; x=inv(a)*b实验结果:x = 0.4784 -0.8793 0.4054(1).代码:x=0:0.01:1; y=sin(2*pi*x); plot(x,y,0,1,0,0,0,1-1,1)图形如示(2)代码:p=1,0,0,8,; x=roots(p)实验结果:x = -1.0000 + 1.7321i -1.0000 - 1.7321i 2.0000 3. help inv INV Matrix inverse. INV(X) is the inverse of the square matrix X. A warning message is printed if X is badly scaled or nearly singular. See also SLASH, PINV, COND, CONDEST, LSQNONNEG, LSCOV. Overloaded methods help idmodel/inv.mhelp sym/inv.m help plot PLOT Linear plot. PLOT(X,Y) plots vector Y versus vector X. If X or Y is a matrix, then the vector is plotted versus the rows or columns of the matrix, whichever line up. If X is a scalar and Y is a vector, length(Y) disconnected points are plotted. PLOT(Y) plots the columns of Y versus their index. If Y is complex, PLOT(Y) is equivalent to PLOT(real(Y),imag(Y). In all other uses of PLOT, the imaginary part is ignored. Various line types, plot symbols and colors may be obtained with PLOT(X,Y,S) where S is a character string made from one element from any or all the following 3 columns: b blue . point - solid g green o circle : dotted r red x x-mark -. dashdot c cyan + plus - dashed m magenta * star y yellow s square k black d diamond v triangle (down) triangle (up) triangle (right) p pentagram h hexagram For example, PLOT(X,Y,c+:) plots a cyan dotted line with a plus at each data point; PLOT(X,Y,bd) plots blue diamond at each data point but does not draw any line. PLOT(X1,Y1,S1,X2,Y2,S2,X3,Y3,S3,.) combines the plots defined by the (X,Y,S) triples, where the Xs and Ys are vectors or matrices and the Ss are strings. For example, PLOT(X,Y,y-,X,Y,go) plots the data twice, with a solid yellow line interpolating green circles at the data points. The PLOT command, if no color is specified, makes automatic use of the colors specified by the axes ColorOrder property. The default ColorOrder is listed in the table above for color systems where the default is blue for one line, and for multiple lines, to cycle through the first six colors in the table. For monochrome systems, PLOT cycles over the axes LineStyleOrder property. PLOT returns a column vector of handles to LINE objects, one handle per line. The X,Y pairs, or X,Y,S triples, can be followed by parameter/value pairs to specify additional properties of the lines. See also SEMILOGX, SEMILOGY, LOGLOG, PLOTYY, GRID, CLF, CLC, TITLE, XLABEL, YLABEL, AXIS, AXES, HOLD, COLORDEF, LEGEND, SUBPLOT, STEM. Overloaded methods help cfit/plot.m help iddata/plot.m help idmodel/plot.m help max MAX Largest component. For vectors, MAX(X) is the largest element in X. For matrices, MAX(X) is a row vector containing the maximum element from each column. For N-D arrays, MAX(X) operates along the first non-singleton dimension. Y,I = MAX(X) returns the indices of the maximum values in vector I. If the values along the first non-singleton dimension contain more than one maximal element, the index of the first one is returned. MAX(X,Y) returns an array the same size as X and Y with the largest elements ta

温馨提示

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

评论

0/150

提交评论