《MATLAB实验报告第一章.doc》由会员分享,可在线阅读,更多相关《MATLAB实验报告第一章.doc(9页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、贵州大学实验报告(小三号,加黑)学院: 专业: 班级:姓名张成思学号实验组实验时间2011.10.24指导教师周雪梅成绩实验项目名称实验一实验目的熟悉MATLAB的操作环境及基本操作方法掌握MATLAB的搜索路径及其设置方法熟悉MATLAB帮助信息的查阅方法实验要求利用MATLAB的帮助功能分别查询inv、plot、max、round等函数的功能及用法。完成下列操作:(1)在MATLAB命令窗口输入以下命令:x=0:pi/10:2*pi; y=xin(x);(2)在工作空间窗口选择变量y,再在工作空间窗口选择绘图菜单命令或在工具栏中单击绘图命令按钮,绘制变量y的图形,并分析图形的含义。实验原理
2、实验仪器实验步骤实验内容3. help invhelp plothelp maxhelp round4.(1) x=0:pi/10:2*pi; y=xin(x);实验数据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 f
3、unctions or methods (ones with the same name in other directories) help gf/inv.m help zpk/inv.m help tf/inv.m help ss/inv.m help lti/inv.m help frd/inv.m help idmodel/inv.m help sym/inv.m Reference page in Help browser doc inv help plot PLOT Linear plot. PLOT(X,Y) plots vector Y versus vector X. If
4、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)
5、. 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 -. das
6、hdot c cyan + plus - dashed m magenta * star (none) no line 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 poi
7、nt 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
8、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 c
9、olors in the table. For monochrome systems, PLOT cycles over the axes LineStyleOrder property. If you do not specify a marker type, PLOT uses no marker. If you do not specify a line style, PLOT uses a solid line. PLOT(AX,.) plots into the axes with handle AX. PLOT returns a column vector of handles
10、to lineseries objects, one handle per plotted line. The X,Y pairs, or X,Y,S triples, can be followed by parameter/value pairs to specify additional properties of the lines. For example, PLOT(X,Y,LineWidth,2,Color,.6 0 0) will create a plot with a dark red line width of 2 points. Backwards compatibil
11、ity PLOT(v6,.) creates line objects instead of lineseries objects for compatibility with MATLAB 6.5 and earlier. See also plottools, semilogx, semilogy, loglog, plotyy, plot3, grid, title, xlabel, ylabel, axis, axes, hold, legend, subplot, scatter. Overloaded functions or methods (ones with the same
12、 name in other directories) help phytree/plot.m help cfit/plot.m help fints/plot.m help idmodel/plot.m help idfrd/plot.m help iddata/plot.m help cgrules/plot.m help xregtwostage/plot.m help xregtransient/plot.m help xregmodel/plot.m help xregarx/plot.m help localmulti/plot.m help localmod/plot.m hel
13、p localavfit/plot.m help sweepset/plot.m help mdevtestplan/plot.m help cgdatasetnode/plot.m help mpc/plot.m help dspdata/plot.m help wdectree/plot.m help ntree/plot.m help dtree/plot.m help wvtree/plot.m help rwvtree/plot.m help edwttree/plot.m Reference page in Help browser doc plot help max MAX La
14、rgest 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
15、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 taken from X or Y. Either one can be a scalar. Y,I = MAX(X,DIM) operates along the dimension DIM.
16、 When complex, the magnitude MAX(ABS(X) is used, and the angle ANGLE(X) is ignored. NaNs are ignored when computing the maximum. Example: If X = 2 8 4 then max(X,1) is 7 8 9, 7 3 9 max(X,2) is 8 and max(X,5) is 5 8 5 9, 7 5 9. See also min, median, mean, sort. Overloaded functions or methods (ones w
17、ith the same name in other directories) help quantizer/max.m help fints/max.m help localpspline/max.m help localpoly/max.m Reference page in Help browser doc max help round ROUND Round towards nearest integer. ROUND(X) rounds the elements of X to the nearest integers. See also floor, ceil, fix. Overloaded functions or methods (ones with the same name in other directories) help quantizer/round.m help sym/round.m Reference page in Help browser doc round4. 实验总结指导教师意见签名: 年 月 日注:各学院可根据教学需要对以上栏木进行增减。表格内容可根据内容扩充。
限制150内