Sách hướng dẫn về MatLab cho người mới bắt đầu

346 2K 7
Sách hướng dẫn về MatLab cho người mới bắt đầu

Đ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

Sách hướng dẫn về MatLab cho người mới bắt đầu

A Guide to MATLABThis book is a short, focused introduction to MATLAB, a comprehen-sive software system for mathematics and technical computing. It willbe useful to bothbeginning and experienced users. It contains conciseexplanations of essential MATLAB commands, as well as easily under-stood instructions for using MATLAB’s programming features, graphi-cal capabilities, and desktop interface. It also includes an introductionto SIMULINK, a companion to MATLAB for system simulation.Written for MATLAB 6, this book can also be used with earlier (andlater) versions of MATLAB. This book contains worked-out examplesof applications of MATLAB to interesting problems in mathematics,engineering, economics, and physics. In addition, it contains explicitinstructions for using MATLAB’s Microsoft Word interface to producepolished, integrated, interactive documents for reports, presentations,or online publishing.This book explains everything you need to know to begin usingMATLAB to do all these things and more. Intermediate and advancedusers will find useful information here, especially if they are makingthe switch to MATLAB 6 from an earlier version.Brian R. Hunt is an Associate Professor of Mathematics at the Univer-sity of Maryland. Professor Hunt has coauthored four books on math-ematical software and more than 30 journal articles. He is currentlyinvolved in researchon dynamical systems and fractal geometry.Ronald L. Lipsman is a Professor of Mathematics and Associate Deanof the College of Computer, Mathematical, and Physical Sciences at theUniversity of Maryland. Professor Lipsman has coauthored five bookson mathematical software and more than 70 research articles. ProfessorLipsman was the recipient of both the NATO and Fulbright Fellowships.Jonathan M. Rosenberg is a Professor of Mathematics at the Univer-sity of Maryland. Professor Rosenberg is the author of two books onmathematics (one of them coauthored by R. Lipsman and K. Coombes)and the coeditor of Novikov Conjectures, Index Theorems, and Rigidity,a two-volume set from the London Mathematical Society Lecture NoteSeries (Cambridge University Press, 1995). A Guide to MATLABfor Beginners and Experienced UsersBrian R. Hunt Ronald L. Lipsman Jonathan M. Rosenbergwith Kevin R. Coombes, John E. Osborn, and Garrett J. Stuck   Cambridge, New York, Melbourne, Madrid, Cape Town, Singapore, São PauloCambridge University PressThe Edinburgh Building, Cambridge  , United KingdomFirst published in print format - ----- ----- ----© B. Hunt, R. Lipsman, J. Rosenberg, K. Coombes, J. Osborn, G. Stuck 2001MATLAB®, Simulink®, and Handle Graphics® are registered trademarks of TheMathWorks, Inc. Microsoft®, MS-DOS®, and Windows® are registered trademarksof Microsoft Corporation. Many other proprietary names used in this book areregistered trademarks.Portions of this book were adapted from “Differential Equations with MATLAB” byKevin R. Coombes, Brian R. Hunt, Ronald L. Lipsman, John E. Osborn, and Garrett J.Stuck, copyright © 2000, John Wiley & Sons, Inc. Adapted by permission of JohnWiley & Sons, Inc.2001Information on this title: www.cambridge.org/9780521803809This book is in copyright. Subject to statutory exception and to the provision ofrelevant collective licensing agreements, no reproduction of any part may take placewithout the written permission of Cambridge University Press.- ---- ---- ---Cambridge University Press has no responsibility for the persistence or accuracy ofs for external or third-party internet websites referred to in this book, and does notguarantee that any content on such websites is, or will remain, accurate or appropriate.Published in the United States of America by Cambridge University Press, New Yorkwww.cambridge.orghardbackpaperbackpaperbackeBook (NetLibrary)eBook (NetLibrary)hardback Contents at a GlancePreface page xiii1 Getting Started12 MATLAB Basics83 Interacting with MATLAB31Practice Set A: Algebra and Arithmetic484 Beyond the Basics505 MATLAB Graphics67Practice Set B: Calculus, Graphics, and Linear Algebra866 M-Books917 MATLAB Programming1018 SIMULINK and GUIs1219 Applications136Practice Set C: Developing Your MATLAB Skills20410 MATLAB and the Internet21411 Troubleshooting218Solutions to the Practice Sets 235Glossary 299Index 317v ContentsPreface page xiii1 Getting Started1Platforms and Versions 1Installation and Location 2Starting MATLAB 2Typing in the Command Window 3Online Help 4Interrupting Calculations 5MATLAB Windows 6Ending a Session 72 MATLAB Basics8Input and Output 8Arithmetic 8Algebra 10Symbolic Expressions, Variable Precision, and ExactArithmetic 11Managing Variables 13Errors in Input 14Online Help 15Variables and Assignments 16Solving Equations 17Vectors and Matrices 20Vectors 21Matrices 23Suppressing Output 24Functions 24vii viiiContentsBuilt-in Functions 24User-Defined Functions 25Graphics 26Graphing withezplot26Modifying Graphs 27Graphing withplot28Plotting Multiple Curves 303 Interacting with MATLAB31The MATLAB Interface 31The Desktop 31Menu and Tool Bars 33The Workspace 33The Working Directory 34Using the Command Window 35M-Files 36Script M-Files 37Function M-Files 39Loops 41Presenting Your Results 41Diary Files 42Presenting Graphics 43Pretty Printing 45A General Procedure 45Fine-Tuning Your M-Files 46Practice Set A: Algebra and Arithmetic484 Beyond the Basics50Suppressing Output 50Data Classes 51String Manipulation 53Symbolic and Floating Point Numbers 53Functions and Expressions 54Substitution 56More about M-Files 56Variables in Script M-Files 56Variables in Function M-Files 57Structure of Function M-Files 57 ContentsixComplex Arithmetic 58More on Matrices 59Solving Linear Systems 60Calculating Eigenvalues and Eigenvectors 60Doing Calculus withMATLAB 61Differentiation 61Integration 62Limits 63Sums and Products 64Taylor Series 65Default Variables 655 MATLAB Graphics67Two-Dimensional Plots 67Parametric Plots 67Contour Plots and Implicit Plots 69Field Plots 71Three-Dimensional Plots 72Curves in Three-Dimensional Space 72Surfaces in Three-Dimensional Space 73Special Effects 75Combining Figures in One Window 76Animations 77Customizing and Manipulating Graphics 78Change of Viewpoint 80Change of Plot Style 80Full-Fledged Customization 82Quick Plot Editing in the Figure Window 84Sound 85Practice Set B: Calculus, Graphics, and Linear Algebra866 M-Books91Enabling M-Books 92Starting M-Books 93Working withM-Books 95Editing Input 95The Notebook Menu 96 [...]... installation, then MATLAB will likely be found in a directory witha name suchas matlabR12 or matlab SR12 or MATLAB — you may have to hunt around to find it. The subdirectory bin\win32, or perhaps the subdirectory bin, will contain the executable file matlab. exe that runs the program, while the current working directory will probably be set to matlabR12\work. Starting MATLAB You start MATLAB as you would... that typing pi in MATLAB gives an approximation to π accurate Chapter 2 MATLAB Basics In this chapter, you will start learning how to use MATLAB to do mathematics. You should read this chapter at your computer, with MATLAB running. Try the commands in a MATLAB Command Window as you go along. Feel free to experiment with variants of the examples we present; the best way to find out how MATLAB responds... commands, how to access online help, how to recognize the various MATLAB windows you will encounter, and how to exit the application. Chapter 2, MATLABBasics, shows you how to do elementary mathe- matics using MATLAB. This chapter contains the most essential MATLAB commands. Chapter 3, Interacting with MATLAB, contains an introduction to the MATLAB Desktop interface. This chapter will introduce you to the... xiii 1 Getting Started 1 2 MATLAB Basics 8 3 Interacting with MATLAB 31 Practice Set A: Algebra and Arithmetic 48 4 Beyond the Basics 50 5 MATLAB Graphics 67 Practice Set B: Calculus, Graphics, and Linear Algebra 86 6 M-Books 91 7 MATLAB Programming 101 8 SIMULINK and GUIs 121 9 Applications 136 Practice Set C: Developing Your MATLAB Skills 204 10 MATLAB and the Internet 214 11 Troubleshooting 218 Solutions... all the other MATLAB windows (which we talked about in the last section) that are open. You may have to close them separately. Indeed, it is our experience that leaving MATLAB- generated windows around after closing the MATLAB Desktop may be hazardous to your operating system. Still another way to exit is to use the Exit MATLAB option from the File menu of the Desktop. Before you exit MATLAB, you should... Started Figure 1-3: The MATLAB Help Browser. MATLAB Windows We have already described the MATLAB Command Window and the Help Browser, and have mentioned in passing the Command History window, Cur- rent Directory browser, Workspace browser, and LaunchPad. These, and seve- ral other windows you will encounter as you work with MATLAB, will allow you to: control files and folders that you and MATLAB will need... using MATLAB successfully and quickly. We point out the parts of MATLAB you need to know without over- whelming you with details. We help you avoid the rough spots. We give you examples of real uses of MATLAB that you can refer to when you’re doing your own work. And we provide a handy reference to the most useful features of MATLAB. When you’re finished reading this book, you will be able to use MATLAB. .. more of MATLAB on your own. You might not be a MATLAB expert when you finish this book, but you will be prepared to become one — if that’s what you want. We figure you’re probably more interested in being an expert at your own specialty, whether that’s finance, physics, psychology, or engineering. You want to use MATLAB the way we do, as a tool. This book is designed to help you become a proficient MATLAB. .. concrete and simple instructions for the use of MATLAB. We describe the MATLAB interface more elaborately in Chapter 3. Platforms and Versions It is likely that you will run MATLAB on a PC (running Windows or Linux) or on some form of UNIX operating system. (The developers of MATLAB, The MathWorks, Inc., are no longer supporting Macintosh. Earlier versions of MATLAB were available for Macintosh; if you... Stuck 30 Chapter 2: MATLAB Basics ☞ We describe more of MATLAB s graphics commands in Chapter 5. For now, we content ourselves withdemonstrating how to plot a pair of expressions on the same graph. Plotting Multiple Curves Eachtime you execute a plotting command, MATLAB erases the old plot and draws a new one. If you want to overlay two or more plots, type hold on. This command instructs MATLAB to retain . 196Practice Set C: Developing Your MATLAB Skills20410 MATLAB and the Internet21 4MATLAB Help on the Internet 214Posting MATLAB Programs and Output 215M-Files,. xiii1 Getting Started12 MATLAB Basics83 Interacting with MATLAB3 1Practice Set A: Algebra and Arithmetic484 Beyond the Basics505 MATLAB Graphics67Practice

Ngày đăng: 13/09/2012, 09:21

Từ khóa liên quan

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

  • Đang cập nhật ...

Tài liệu liên quan