自控控制理论 实验一_第1页
自控控制理论 实验一_第2页
自控控制理论 实验一_第3页
自控控制理论 实验一_第4页
自控控制理论 实验一_第5页
已阅读5页,还剩14页未读 继续免费阅读

下载本文档

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

文档简介

1、Using Toolbox Path Cache. Type help toolbox_path_cache for more info. To get started, select MATLAB Help from the Help menu. 7.1.1MATLAB语言平台(2) 练习MATLAB命令的基本操作1)常数矩阵输入 a=1 2 3a = 1 2 3 a=1;2;3a = 1 2 3 b=1 2 5b = 1 2 5 b=1 2 5; aa = 1 2 3 aans = 1 2 3 bb = 1 2 5 bans = 1 2 5 c=a*bc = 1 2 5 2 4 10 3

2、6 15 c=a*b? Error using = *Inner matrix dimensions must agree. a=1 2 3;4 5 6;7 8 0a = 1 2 3 4 5 6 7 8 0 a2ans = 30 36 15 66 81 42 39 54 69 a0.5ans = 0.5977 + 0.7678i 0.7519 + 0.0979i 0.5200 - 0.4680i 1.4102 + 0.1013i 1.7741 + 0.6326i 1.2271 - 0.7467i 1.2757 - 1.0289i 1.6049 - 1.0272i 1.1100 + 1.6175

3、i2)作循环命令程序 makesum=0; for i=1:1:100 makesum=makesum+i; end makesummakesum = 50503)分别执行下列命令 a=1 2 3;4 5 6;7 8 0a = 1 2 3 4 5 6 7 8 0 poly(a)ans = 1.0000 -6.0000 -72.0000 -27.0000 rank(a)ans = 3 det(a)ans = 27 trace(a)ans = 6 inv(a) ans = -1.7778 0.8889 -0.1111 1.5556 -0.7778 0.2222 -0.1111 0.2222 -0.

4、1111 eig(a) ans = 12.1229 -0.3884 -5.7345help help HELP On-line help, display text at command line. HELP, by itself, lists all primary help topics. Each primary topic corresponds to a directory name on the MATLABPATH. HELP TOPIC gives help on the specified topic. The topic can be a command name, a d

5、irectory name, or a MATLABPATH relative partial pathname (see HELP PARTIALPATH). If it is a command name, HELP displays information on that command. If it is a directory name, HELP displays the Table-Of-Contents for the specified directory. For example, help general and help matlab/general both list

6、 the Table-Of-Contents for the directory toolbox/matlab/general. HELP FUN displays the help for the function FUN. T = HELP(topic) returns the help text in a n separated string. LOOKFOR XYZ looks for the string XYZ in the first comment line of the HELP text in all M-files found on the MATLABPATH. For

7、 all files in which a match occurs, LOOKFOR displays the matching lines. MORE ON causes HELP to pause between screenfuls if the help text runs to several screens. In the online help, keywords are capitalized to make them stand out. Always type commands in lowercase since all command and function nam

8、es are actually in lowercase. For tips on creating help for your m-files type help.m. See also LOOKFOR, WHAT, WHICH, DIR, MORE. Overloaded methods help cgmathsobject/help.m help cvtest/help.m help cvdata/help.m helpHELP topics:matlabgeneral - General purpose commands.matlabops - Operators and specia

9、l 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

10、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 -

11、 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

12、)winfuncomcli - (No table of contents file)matlabdemos - Examples and demonstrations.toolboxlocal - Preferences.simulinksimulink - Simulinksimulinkblocks - Simulink block library.simulinkcomponents - Simulink components.simulinkfixedandfloat - (No table of contents file)fixedandfloatfxpdemos - Fixed

13、-Point Blockset Demosfixedandfloatobsolete - Obsolete Fixed-Point Blocksetsimulinksimdemos - Simulink 4 demonstrations and samples.simdemosaerospace - Simulink: Aerospace model demonstrations and samples.simdemosautomotive - Simulink: Automotive model demonstrations and samples.simdemossimfeatures -

14、 Simulink: Feature demonstrations and samples.simdemossimgeneral - Simulink: General model demonstrations and samples.simdemossimnew - Simulink: New features model demonstrations and samples.simulinkdee - Differential Equation Editorsimulinkdastudio - (No table of contents file)stateflowstateflow -

15、Stateflowstateflowsfdemos - Stateflow demonstrations and samples.stateflowcoder - Stateflow Coderrtwrtw - Real-Time Workshoprtwrtwdemos - Real-Time Workshop Demosrtwdemosrsimdemos - (No table of contents file)asap2asap2 - (No table of contents file)asap2user - (No table of contents file)rtwinrtwin -

16、 Real-Time Windows Tblksaeroblks - 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 cdmacdma - C

17、DMA Reference Blockset.cdmacdmamasks - CDMA Reference Blockset mask helper functions.cdmacdmamex - CDMA Reference Blockset S-Functions.cdmacdmademos - CDMA Reference Blockset demonstrations and buildercombuilder - MATLAB COM Bmcomm - Communications Tmcommdemos - Commu

18、nications Toolbox Dmcommobsolete - Archived MATLAB Files from Communications Toolbox Version 1.5.commblkscommblks - Communications Bmblkscommmasks - Communications Blockset mask helper mblkscommmex - Communications Blockset S-mblkscommblksdemos -

19、 Communications Blockset Dmblksobsoletecommblksobsolete - Archived Simulink Files from Communications Toolbox Version 1.5.toolboxcompiler - MATLAB Compilercontrolcontrol - Control System Toolbox.controlctrlguis - Control System Toolbox - GUI support functions.controlctrlobsolete - Control Sy

20、stem Toolbox - obsolete commands.controlctrlutil - (No table of contents file)controlctrldemos - Control System Toolbox - Demos.curvefitcurvefit - Curve Fitting Toolboxcurvefitcftoolgui - (No table of contents file)daqdaq - Data Acquisition Toolbox.daqdaqguis - Data Acquisition Toolbox - Data Acquis

21、ition 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 Grap

22、hical User Interfacetoolboxdials - Dials & Gauges Blocksetdspblksdspblks - DSP Blocksetdspblksdspmasks - DSP Blockset mask helper functions.dspblksdspmex - DSP Blockset S-Function MEX-files.dspblksdspdemos - DSP Blockset demonstrations and examples.targetsecoder - Real-Time Workshop Embedded Coderec

23、oderecoderdemos - (No table of contents file)toolboxexlink - Excel Link.filterdesignfilterdesign - Filter Design Toolboxfilterdesignquantization - (No table of contents file)filterdesignfiltdesdemos - Filter Design Toolbox Demonstrations.financefinance - Financial Toolbox.financecalendar - Financial

24、 Toolbox calendar functions.financefindemos - Financial Toolbox demonstration functions.financefinsupport - (No table of contents file)finderivfinderiv - Financial Derivatives Toolbox.toolboxfixpoint - Fixed-Point Blocksetftseriesftseries - Financial Time Series Toolboxftseriesftsdemos - (No table o

25、f contents file)ftseriesftsdata - (No table of contents file)ftseriesftstutorials - (No table of contents file)fuzzyfuzzy - Fuzzy Logic Toolbox.fuzzyfuzdemos - Fuzzy Logic Toolbox Demos.garchgarch - GARCH Toolbox.garchgarchdemos - (No table of contents file)identident - System Identification Toolbox

26、.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

27、 and sample imagesinstrumentinstrument - Instrument Control Toolbox.instrumentinstrumentdemos - (No table of contents file)lmilmictrl - LMI Control Toolbox: Control Applicationslmilmilab - LMI Control Toolboxmapmap - Mapping Toolbox mapmapdisp - Mapping Toolbox Map Definition and Display.mapmapproj

28、- Mapping Toolbox Projections.matlabxlmatlabxl - MATLAB Excel Builder.mbcmbc - Model-Based Calibration Toolboxmbcmbcdata - Model-Based Calibration Toolbox.mbcmbcdesign - Model-Based Calibration Toolbox.mbcmbcexpr - Model-Based Calibration Toolbox.mbcmbcguitools - Model-Based Calibration Toolbox.mbcm

29、bclayouts - (No table of contents file)mbcmbcmodels - Model-Based Calibration Toolbox.mbcmbcsimulink - Model-Based Calibration Toolbox.mbcmbctools - Model-Based Calibration Toolbox.mbcmbcview - Model-Based Calibration Toolbox.mechmech - SimMechanicsmechmechdemos - SimMechanics Demos.mpcmpccmds - Mod

30、el Predictive Control Toolbox.mpcmpcdemos - Model Predictive Control Toolboxmpc555dkmpc555dk - Embedded Target for Motorola MPC555canlibblockset - (No table of contents file)blocksetmfiles - (No table of contents file)vectorlibblockset - (No table of contents file)blocksetmfiles - (No table of conte

31、nts file)commonconfiguration - (No table of contents file)mpc555dkpil - (No table of contents file)rtblockset - (No table of contents file)blocksetmfiles - (No table of contents file)mfilesSimulinkUtilities - (No table of contents file)mpc555dkmpc555demos - (No table of contents file)mutoolscommands

32、 - 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 D

33、emonstrations.nnetnnobsolete - (No table of contents file)toolboxoptim - Optimization Toolboxtoolboxpde - Partial Differential Equation Toolbox.simulinkperftools - Simulink Performance Toolssimulinkmdldiff - Simulink Graphical Mergesimulinksimcoverage - Simulink Model Coverage Tool rtwaccel - Simuli

34、nk Acceleratorpowersyspowersys - SimPowerSystemspowersyspowerdemo - SimPowerSystems Demos.toolboxreqmgt - Requirements Management Interface.toolboxrobust - Robust Control Toolbox.toolboxrptgen - MATLAB Report Generatortoolboxrptgenext - Simulink Report Generatortoolboxruntime - MATLAB Runtime Server

35、 Development Kit toolboxsb2sl - SB2SL (converts SystemBuild to Simulink)signalsignal - Signal Processing Toolbox signalsigtools - Filter Design & Analysis Tool (GUI)signalsptoolgui - Signal Processing Toolbox GUIsignalsigdemos - Signal Processing Toolbox Demonstrations.toolboxsplines - Spline Toolbo

36、x.toolboxstats - Statistics Toolboxtoolboxsymbolic - Symbolic Math Toolbox.tic6000tic6000 - Embedded Target for Texas Instruments TMS320C6000(tm)tic6000blks - TI C6000 (tm) Blocksvrvr - Virtual Reality Toolboxvrvrdemos - Virtual Reality Toolbox examples.waveletwavelet - Wavelet Toolboxwaveletwavedem

37、o - Wavelet Toolbox Demonstrations.webserverwebserver - MATLAB Web Server.webserverwsdemos - (No table of contents file)xpcxpc - xPC Targetbuildxpcblocks - (No table of contents file)xpcxpcdemos - xPC Target - demos and sample script files.kernelembedded - xPC Target Embedded Optionmatlab65work - (N

38、o table of contents file)For more help on directory/topic, type help topic.For command syntax information, type help syntax.7.1.2MATLAB语言的数值运算(1) 基本矩阵运算1)创建数值矩阵a=1 2 3;4 5 6;7 8 9; aa = 1 2 3 4 5 6 7 8 9 a(3,2) ans = 8 a(:,1) ans = 1 4 7 t=0:10; u=0:0.1:10; tt = 0 1 2 3 4 5 6 7 8 9 10 uu = Columns 1

39、 through 6 0 0.1000 0.2000 0.3000 0.4000 0.5000 Columns 7 through 12 0.6000 0.7000 0.8000 0.9000 1.0000 1.1000 Columns 13 through 18 1.2000 1.3000 1.4000 1.5000 1.6000 1.7000 Columns 19 through 24 1.8000 1.9000 2.0000 2.1000 2.2000 2.3000 Columns 25 through 30 2.4000 2.5000 2.6000 2.7000 2.8000 2.90

40、00 Columns 31 through 36 3.0000 3.1000 3.2000 3.3000 3.4000 3.5000 Columns 37 through 42 3.6000 3.7000 3.8000 3.9000 4.0000 4.1000 Columns 43 through 48 4.2000 4.3000 4.4000 4.5000 4.6000 4.7000 Columns 49 through 54 4.8000 4.9000 5.0000 5.1000 5.2000 5.3000 Columns 55 through 60 5.4000 5.5000 5.600

41、0 5.7000 5.8000 5.9000 Columns 61 through 66 6.0000 6.1000 6.2000 6.3000 6.4000 6.5000 Columns 67 through 72 6.6000 6.7000 6.8000 6.9000 7.0000 7.1000 Columns 73 through 78 7.2000 7.3000 7.4000 7.5000 7.6000 7.7000 Columns 79 through 84 7.8000 7.9000 8.0000 8.1000 8.2000 8.3000 Columns 85 through 90

42、 8.4000 8.5000 8.6000 8.7000 8.8000 8.9000 Columns 91 through 96 9.0000 9.1000 9.2000 9.3000 9.4000 9.5000 Columns 97 through 101 9.6000 9.7000 9.8000 9.9000 10.0000 a(:,3)=2;3;4; aa = 1 2 2 4 5 3 7 8 4 b=1 1+2i;3+4i 3; bb = 1.0000 1.0000 + 2.0000i 3.0000 + 4.0000i 3.0000 2)创建特殊矩阵 a=ones(3,3); b=zer

43、os(2,2); c=eye(4);a = 1 1 1 1 1 1 1 1 1 bb = 0 0 0 0 cc = 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 magic(4)ans = 16 2 3 13 5 11 10 8 9 7 6 12 4 14 15 13)练习矩阵运算 a=0 1 0;0 0 1;-6 -11 -6; b=1 2;3 4;5 6; c=1 1 0;0 1 1; v1=c*av1 = 0 1 1 -6 -11 -5 v2=a*bv2 = 3 4 5 6 -69 -92 v3=c*a*bv3 = 8 10 -64 -86 v4=b*cv4 = 1 3

44、 2 3 7 4 5 11 6 v5=c*bv5 = 4 6 8 10 a2ans = 0 0 1 -6 -11 -6 36 60 25 a(1/2)ans = 0.0000 + 0.4894i -0.0000 - 0.5588i -0.0000 - 0.0482i 0.0000 + 0.2891i 0.0000 + 1.0195i -0.0000 - 0.2696i 0.0000 + 1.6179i 0.0000 + 3.2553i 0.0000 + 2.6374i a1=a+b*ca1 = 1 4 2 3 7 5 -1 0 0 a2=c*b-a(1:2,1:2)a2 = 4 5 8 10 a3=a(1:2,2:3)+c*ba3 = 5 6 8 11 ar=c/aar = -0.8333 -1.0000 -0.1667 1.0000 1.0000 0 al=abal = -5.6667 -8.6667 1.0000 2.00003.0000 4.00004)练习矩阵特征运算 a, inv(a), diag(a), tril(a), inv(a),ans = 0 0 -6 1 0 -11 0 1 -6an

温馨提示

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

评论

0/150

提交评论