Engineering and Scientific Computations Using MATLAB phần 2 pot

23 298 0
Engineering and Scientific Computations Using MATLAB phần 2 pot

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Chapter I: MATLAB Basics 12 Chapter 1: MATLAB Basics 13 By clicking MATLAB\general, we have the Help Window illustrated in Figure 1.1 1 and a complete description is given as well. Figure I. 1 1. Help Window Chapter I: MATLAB Basics 14 Chapter 1: MATLAB Basics 15 the MATLAB Help Window is displayed for all MATLAB versions. For example, for MATLAB 6.1, see Figure 1.12. Chapter 1: MATLAB Basics 16 Figure 1.12. MATLAB 6.1 helpde s k window The complete MATLAB documentation is available for users. In general, the use of the help and demo commands is the simplest way to find the needed information. Typing and pressing the Enter key guides us into the MATLAB Demos Window as illustrated in Figure 1.13 for MATLAB 6.5 and 6.1. Chapter 1: MATLAB Basics Figure 1.13. MATLAB 6.5 and 6.1 Demos Windows 17 Chapter I: MATLAB Basics 18 A list of topics which have demonstrations appears in the left-hand window, while the information on these topics appears in the upper right-hand window. In order to expand a topic in the left window, double-click on it and subtopics will appear below. When the user clicks on one of these, a list of possible demonstrations to run in the lower right-hand window appears. The button below this window changes to run demonstration. Choosing the subtopics (Matrices, Numerics, Visualization, Language/Graphics, Gallery, Games, Miscellaneous and To learn more), different topics will be explained and thoroughly covered. For example, clicking the subtopic Matrices, we have the Matrices MATLAB Demos (demonstrations) Window, as documented in Figure 1.14. Figure 1.14. Matrices MATLAB 6.1 Demos Window By double clicking Basic matrix operations, Inverse of matrices, Graphs and matrices, Sparse matrices, Matrix multiplication, Eigenvalues and singular value show, and Command line demos, illustrative example are available to demonstrate, examine, and explore different problems. Newest MATLAB releases provide the user with the full capabilities of the MATLAB environment. As illustrated, MATLAB 6.5 integrates Communication, Control System, Curve Fitting, Data Acquisition, Database, Filter Design, Financial, Fuzzy Logic, Image Processing, Instrument Control, LMI, Mapping, Model Predictive Control, Mu- Analysis and Synthesis, Neural Network, Optimization, Partial Differential Equations, Robust Control, Signal Processing, Spline, Statistics, Symbolic Math, System Identification, Virtual Reality, and Wavelet Toolboxes, as well as SIMULINK and Blocksets environments and libraries. The demonstration capabilities of MATLAB 6.5 were significantly enhanced, and Figures 1.15 and 1.16 illustrate the application of the MATLAB environment and SIMULINK to perform simulations for the F-14 and three-degrees-of-freedom guided missile models. Chapter 1: MATLAB Basics Figure 1.15. MAT LA^ 6.5 Demos Window running F-14 flight control simulation 19 Chapter I: MATLAB Basics 20 Figure 1.16. MATLAB 6.5 Demos Window running three-degrees-of-freedom guided missile simulation with animation in SIMULINK The M-file EditodDebugger enables one to view, develop, edit, and debug MATLAB programs. Using the menu, the user can select a code segment for evaluation in the Command Window. Many MATLAB routines are developed and supplied as readable m-files, allowing one to examine the source code, learn from it, and modify it for specific applications and problems. New functions can be written and added, and links to external software and data sources can be created. Access to History is performed through the Command History tool in order to maintain a running record of all commands that the user has executed in the MATLAB Command Window. The user can refer back to these commands and execute code directly from the Command History menu. Access to Files is performed through the Current Directory window and allows one to select a directory to work in. The user can browse, run, and modify files in the directory. Access to Data is performed through the Workspace Browser, allowing one to view the variables in the MATLAB workspace as well as access the Array Editor to view and edit data. The commonly used toolboxes are Statistics, Symbolic Math, Partial Differential Equations, etc. An incomplete list of toolboxes, including the application-specific toolboxes, is as follows (see htte://w~~~~.matl~worlis.coin~ac~css~ielpdesk~help Itelpdesk.shtm1 for details): Chapter I: MATLAB Basics 21 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. Communication Toolbox Control System Toolbox Data Acquisition Toolbox Database Toolbox Datafeed Toolbox Filter Design Toolbox Financial Toolbox Financial Derivatives Toolbox Fuzzy Logic Toolbox GARCH Toolbox Image Processing Toolbox Instrument Control Toolbox Mapping Toolbox 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. Model Predictive Control Toolbox Mu-Analysis and Synthesis Toolbox Neural Network Toolbox Optimization Toolbox Partial Differential Equations Toolbox Robust Control Toolbox Signal Processing Toolbox Spline Toolbox Statistics Toolbox Symbolic Math Toolbox System Identification Toolbox Wavelet Toolbox However, the user must purchase and install the toolboxes needed, and different MATLAB versions and configurations might have different toolboxes available, see Figure 1.17. The user can practice examples to quickly learn how to efficiently use MATLAB to solve a wide variety of scientific and engineering problems. Toolboxes are comprehensive collections of MATLAB functions, commands and solvers that expand the MATLAB environment to solve particular classes of problems. Figure 1.17. MATLAB 6.5. and 6.1 Demos Window with Toolboxes All MATLAB toolboxes have demonstration features. Figure 1.18 illustrates the MATLAB Demos Window for the Optimization Toolbox. [...]... documented in Table 2. 2 Chapter 2: MATLAB Functions, Operators, and Commands 30 Table 2. 2 Elementary Mathematical Functions with Illustrative Examples The user can either type the commands, functions or solvers in the MATLAB prompt (Command Window) or create m-files integrating the commands and functions needed Chapter 2: MAT U B Functions, Operators, and Commands 31 2. 2 MATLAB Characters and Operators... / and / \ and. \ and A A MATLABStatement atbtc a-b-c a * b * c and a * b *c a/b anda./b b \ a (equivalent to a / b ) and b \ a aAbanda.”b Arithmetic Operation addition subtraction multiplication right division left division exponentiation Chapter 2: M TLAB Functions, Operators, and Commands 32 A 2. 3 MATLAB Commands In order to introduce MATLABthrough examples and illustrations, let us document and. .. toolboxes and supplies help and demonstrations needed to environment eficiently use the MATLAB It is evident to the reader by now that MATLAB demonstration programs One should use has Close MATLABusing the Exit MATLAB (Ctrl+Q) command in the MATLABCommand Window (File menu) MATLAB Menu Bar and Toolbar Figure 1.19 illustrates the MATLABmenu bar and toolbar in the Command and Workspace windows Chapter I: MATLAB. .. the Command Window and the resulting images are documented in Figure 1 .2 1 Figure 1 .21 Original and updated images of the underwater vehicle with the animation results Chapter I : MATLAB Basics 26 The size of the images can be displayed In particular, and the original image is shown in Figure 1 .22 Figure 1 .22 Original and updated parrot images The size of the images is found using the whos command that... REFERENCES 1 2 hrt47ZAB 6.5 Release 13, CD-ROM, Mathworks, Inc., Naick, MA, 20 02 Image Processing Toolboxfor Use with MTLAB, User’s Guide Version 3, Mathworks, Inc., Natick, MA, 20 0 1 Chapter 2: MA TLAB Functions, operators, and Commands 27 Chapter 2 MATLAB Functions, Operators, and Commands 2. 1 Mathematical Functions Many mathematical functions, operators, special characters, and commands are available... Size 1x2 1x2 c=a+b, d=a./b, e=b.\a, i=a."b Bytes Class 16 double 16 double 16 double C 1x2 d 1x2 16 double e 1x2 16 double i 1x2 16 double Grand total is 1 2 elements using 96 array array array array array array bytes The MATLA13 environment contains documentation for all the products that are installed In particular, typing Chapter 2: MTLAB Functions, Operators, and Commands 33 >> helpwin and pressing... by MATLAB summarized in Table 2 I - Chapter 2: MATLAB Functions, Operators, and Commands 29 Table 2. 1 Mathematics:.ElementaryMathematical Functions acos acosh I asin, I asinh atan, atanh ceil corn131 x e con j cos cosh cot, coth csc c s c h exp T Absolute value and complex magnitude Inverse cosine and inverse hyperbolic cosine Inverse cotangent and inverse hyperbolic cotangent Inverse cosecant and. .. commonly used commands listed in Table 2. 4 Table 2. 4 MATLAB Commands Command clear MATLAB Help help c l e a r clc help help clc Help h e l p quit quit I who whos I h e l p who h e l p whos Description Clear variables and functions from memory (removes all variables from the workspace) Clear Command Window On-line help, display text at command line Quits MATLAB session (terminates MATLAB after running... transpose and quote nonconjugated transpose assignment equality relational operators logical AND logical OR logical NOT logical exclusive OR < > & I xor The MATLABoperators, functions, and commands can be represented as tables For example, the scalar and array arithmetic operators and characters are reported in Table 2. 3 Table 2. 3 Scalar and Array Arithmetic with Operators and Characters Symbol + - * and. .. variables in the expanded form (lists all the variables in the current workspace, together 4 t h information about their size, bytes, 1 Bellow are some examples to illustrate the scalar and array arithmetic operators as well as commands: >> clear all >> a=10; b =2; c=a+b, d=a/b, e=b\a, i=aAb c = d = e = 12 5 5 i = 100 >> a=[10 51; b= [2 4 1 ; c = 12 9 d = 5.0000 1 .25 00 e = 5.0000 1 .25 00 i = 100 625 >> whos Name . use Close MATLAB using the Exit MATLAB (Ctrl+Q) command in the MATLAB Command Window (File menu). MATLAB Menu Bar and Toolbar. Figure 1.19 illustrates the MATLAB menu bar and toolbar. Mathworks, Inc., Natick, MA, 20 0 1. Chapter 2: MA TLAB Functions, operators, and Commands 27 Chapter 2 MATLAB Functions, Operators, and Commands 2. 1. Mathematical Functions Many. efficiently use MATLAB to solve a wide variety of scientific and engineering problems. Toolboxes are comprehensive collections of MATLAB functions, commands and solvers that expand the MATLAB environment

Ngày đăng: 14/08/2014, 06:22

Từ khóa liên quan

Mục lục

  • page_12.pdf

  • page_13.pdf

  • page_14.pdf

  • page_15.pdf

  • page_16.pdf

  • page_17.pdf

  • page_18.pdf

  • page_19.pdf

  • page_20.pdf

  • page_21.pdf

  • page_22.pdf

  • page_23.pdf

  • page_24.pdf

  • page_25.pdf

  • page_26.pdf

  • page_27.pdf

  • page_28.pdf

  • page_29.pdf

  • page_30.pdf

  • page_31.pdf

Tài liệu cùng người dùng

Tài liệu liên quan