下载此文档

自控原理实验上机指导书.doc


文档分类:高等教育 | 页数:约37页 举报非法文档有奖
1/37
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/37 下载此文档
文档列表 文档介绍
自动控制原理基础实验上机实验指导书自动化工程学院自动控制系实验一 MATLAB 基本操作实验实验目的: Matlab 软件使用的基本方法; Matlab 的数据表示、基本运算和程序控制语句; Matlab 绘图命令及基本绘图控制; Matlab 程序设计的基本方法。实验装置: 计算机实验原理及内容: 基本规则 一般 MATLAB 命令格式为[输出参数1,输出参数2,……]=(命令名)(输入参数1,输入参数2,……) 输出参数用方括号,输入参数用圆括号如果输出参数只有一个可不使用括号。 %后面的任意内容都将被忽略,而不作为命令执行。 可用↑、↓键来重现已输入的数据或命令。用←、→键来移动光标进行修改。 所有 MATLAB 命令都用小写字母。大写字母和小写字母分别表示不同的变量。 常用数有特定的名字,如pi( = )、 Inf (=∞)、 NaN 则表示不定型求得的结果(如 0/0 )。 矩阵的输入要一行一行的进行,每行各元素用空格或( , )分开,每行用(;)分开。如 123 A= 456789 MATLAB 书写格式为 A=[1 23; 456; 789] 在 MATLABZ 中运行如下程序可得到 A矩阵 a=[1 2 3;4 5 6;7 89] a=123456789 需要显示命令的计算结果时,则语句后面不加“;”号,否则要加“;”号。运行下面两种格式可以看出他们的区别 a=[1 2 3;4 5 6;7 89] a=[1 2 3;4 5 6;7 8 9]; a=(不显示计算结果) 123456789 当输入语句过长需要换行时,应加上“…”后再回车,则可连续输入。 文件管理常用命令 帮助( HELP )命令 MATLAB 有很多命令,因此很不容易记忆。使用 HELP 命令可以得到有关命令的屏幕帮助信息。如在 MATLA B 环境下直接运行 HEL P 命令就会在屏幕上给出 MATLA B的基本命令以及相关的工具箱软件命令(请同学自行验证)。而下面的格式可以得到指定命令的帮助信息,和详细说明。 help 命令名如: help step STEP Step response of LTI systems. STEP(SYS) plots the step response of each input channel of the LTI system SYS. The time range and number of points are chosen automatically. STEP(SYS,TFINAL) simulates the step response from t=0 to the final time t= TFINAL. For discrete-time systems with unspecified sampling time, TFINAL is interpreted as the number of samples. STEP(SYS,T) uses the user-supplied time vector T for simulation. For discrete-time systems, T should beof the form Ti:Ts:Tf where Ts is the sample time of the system. For continuous systems, T should beof the form Ti:dt:Tf where dt will e the sample time ofa discrete approximation to the continuous system. STEP(SYS1,SYS2,...,T) plots the step response of multiple LTI systems SYS1,SYS2,... ona single plot. The time vector T is optional. You can also specify a color, line style, and marker for each system, as in step(sys1,'r',sys2,'y--',sys3,'gx'). When invoked with left-hand arguments, [Y,T] = STEP(SYS,...) returns the output response Y and the time vector

自控原理实验上机指导书 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数37
  • 收藏数0 收藏
  • 顶次数0
  • 上传人63229029
  • 文件大小317 KB
  • 时间2017-06-21