1. Trang chủ
  2. » Tất cả

LetMeRead.net__MATLAB.Programming.Mathematical.Problem.Solutions.3110663562

320 34 0

Đ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

Thông tin cơ bản

Định dạng
Số trang 320
Dung lượng 9,59 MB

Nội dung

Dingyü Xue MATLAB® Programming Also of Interest Fractional-Order Control Systems, Fundamentals and Numerical Implementations Dingyü Xue, 2017 ISBN 978-3-11-049999-5, e-ISBN (PDF) 978-3-11-049797-7, e-ISBN (EPUB) 978-3-11-049719-9 Calculus Problem Solutions with MATLAB® Dingyü Xue, 2020 ISBN 978-3-11-066362-4, e-ISBN (PDF) 978-3-11-066697-7, e-ISBN (EPUB) 978-3-11-066375-4 Linear Algebra and Matrix Computations with MATLAB® Dingyü Xue, 2020 ISBN 978-3-11-066363-1, e-ISBN (PDF) 978-3-11-066699-1, e-ISBN (EPUB) 978-3-11-066371-6 Solving Optimization Problems with MATLAB® Dingyü Xue, 2020 ISBN 978-3-11-066364-8, e-ISBN (PDF) 978-3-11-066701-1, e-ISBN (EPUB) 978-3-11-066369-3 Differential Equation Solutions with MATLAB® Dingyü Xue, 2020 ISBN 978-3-11-067524-5, e-ISBN (PDF) 978-3-11-067525-2, e-ISBN (EPUB) 978-3-11-067531-3 Dingyü Xue ® MATLAB Programming | Mathematical Problem Solutions Author Prof Dingyü Xue School of Information Science and Engineering Northeastern University Wenhua Road 3rd Street 110819 Shenyang China xuedingyu@mail.neu.edu.cn MATLAB and Simulink are registered trademarks of The MathWorks, Inc See www.mathworks.com/ trademarks for a list of additional trademarks The MathWorks Publisher Logo identifies books that contain MATLAB and Simulink content Used with permission The MathWorks does not warrant the accuracy of the text or exercises in this book This book’s use or discussion of MATLAB and Simulink software or related products does not constitute endorsement or sponsorship by The MathWorks of a particular use of the MATLAB and Simulink software or related products For MATLAB® and Simulink® product information, or information on other related products, please contact: The MathWorks, Inc Apple Hill Drive Natick, MA, 01760-2098 USA Tel: 508-647-700 Fax: 508-647-7001 E-mail: info@mathworks.com Web: www.mathworks.com ISBN 978-3-11-066356-3 e-ISBN (PDF) 978-3-11-066695-3 e-ISBN (EPUB) 978-3-11-066370-9 Library of Congress Control Number: 2019955271 Bibliographic information published by the Deutsche Nationalbibliothek The Deutsche Nationalbibliothek lists this publication in the Deutsche Nationalbibliografie; detailed bibliographic data are available on the Internet at http://dnb.dnb.de © 2020 Tsinghua University Press Limited and Walter de Gruyter GmbH, Berlin/Boston Cover image: Dingyü Xue Typesetting: VTeX UAB, Lithuania Printing and binding: CPI books GmbH, Leck www.degruyter.com Preface Scientific computing is commonly and inevitably encountered in course learning, scientific research and engineering practice for each scientific and engineering student and researcher For the students and researchers in the disciplines which are not pure mathematics, it is usually not a wise thing to learn thoroughly low-level details of related mathematical problems, and also it is not a simple thing to find solutions of complicated problems by hand It is an effective way to tackle scientific problems, with high efficiency and in accurate and creative manner, with the most advanced computer tools This method is especially useful in satisfying the needs for those in the area of science and engineering The author had made some effort towards this goal by addressing directly the solution methods for various branches in mathematics in a single book Such a book, entitled “MATLAB based solutions to advanced applied mathematics”, was published first in 2004 by Tsinghua University Press Several new editions are published afterwards: in 2015, the second edition in English by CRC Press, and in 2018, the fourth edition in Chinese were published Based on the latest Chinese edition, a brand new MOOC project was released in 2018,1 and received significant attention The number of the registered students was about 14 000 in the first round of the MOOC course, and reached tens of thousands in later rounds The textbook has been cited tens of thousands times by journal papers, books, and degree theses The author has over 30 years of extensive experience of using MATLAB in scientific research and education Significant amount of materials and first-hand knowledge has been accumulated, which cannot be covered in a single book A series entitled “Professor Xue Dingyü’s Lecture Hall” of such works are scheduled with Tsinghua University Press, and the English editions are included in the DG STEM series with De Gruyter These books are intended to provide systematic, extensive and deep explorations in scientific computing skills with the use of MATLAB and related tools The author wants to express his sincere gratitude to his supervisor, Professor Derek Atherton of Sussex University, who first brought him into the paradise of MATLAB This MATLAB series is not a simple revision of the existing books With decades of experience and material accumulation, the idea of “revisiting” is adopted in authoring these books, in contrast to other mathematics and other MATLAB-rich books The viewpoint of an engineering professor is established and the focus is on solving various applied mathematical problems with tools Many innovative skills and generalpurpose solvers are provided to solve problems with MATLAB, which is not possible by any other existing solvers, so as to better illustrate the applications of computer tools in solving mathematical problems in every mathematics branch It also helps MOOC (in Chinese) address: https://www.icourse163.org/learn/NEU-1002660001 https://doi.org/10.1515/9783110666953-201 VI | Preface the readers broaden their viewpoints in scientific computing, and even in finding innovative solutions by themselves to scientific computing which cannot be solved by any other existing methods The first title in the MATLAB series can be used as an entry-level textbook or reference book to MATLAB programming, so as to establish a solid foundation and deep understanding for the application of MATLAB in scientific computing Each subsequent volume tries to cover a branch or topic in mathematical courses These MATLAB books are suitable for the readers who have already learnt the related mathematical courses, and revisit the courses to learn how to solve the problems by using computer tools It can also be used as a companion in synchronizing the learning of related mathematics courses, and for viewing the course from a different angle The readers may expand their knowledge in learning the related courses, so as to better understand and practice the relevant materials Bearing in mind the “computational thinking” in authoring the series, deep understanding and explorations are made for each mathematics branch involved This book is the first in the MATLAB series Systematic illustration of MATLAB programming is provided in the book The commonly used data and statement structures in MATLAB are introduced first, followed by algebraic and transcendental function evaluations of matrices, and data manipulations Flow controls and applications in MATLAB programming are then introduced, and MATLAB function programming and skills are provided Scientific visualization in MATLAB are addressed Advanced topics such as the designs of MATLAB interface to other languages, object-oriented programming and graphical user interface are illustrated, such that a better foundation can be established for the readers to continue learning scientific computing and the knowledge of other related mathematical fields At the time the books are published, the author wishes to express his sincere gratitude to his wife, Professor Yang Jun Her love and selfless care over the decades provided the author immense power, which supports his academic research, teaching and writing September 2019 Xue Dingyü Contents Preface | V 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.2 1.2.1 1.2.2 1.3 1.4 Introduction to computer mathematics languages | Introduction to solving mathematical problems | Why learn a computer mathematics language? | Analytical and numerical solutions | Development of mathematical packages | Limitations of conventional computer languages | History of computer mathematics languages | 10 The early days of computer mathematics languages | 10 Representative modern computer mathematics languages | 11 Three-phase solution of scientific computing problems | 12 Problems | 14 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.3 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.4 2.4.1 2.4.2 Fundamentals of MATLAB programming | 17 Command windows and fundamental commands | 18 Regulations in variable names | 18 Reserved constants | 19 Setting of display formats | 20 Low-level operating system commands | 21 Setting of MATLAB working environment | 21 MATLAB workspace and management | 23 Other supporting facilities | 23 Commonly used data types | 24 Numeric data types | 24 Symbolic data | 26 Generation of arbitrary symbolic matrices | 28 Symbolic functions | 29 Integer and logic variables | 29 Recognition of data types | 29 Sizes and lengths of matrices | 30 String data type | 30 Expression of string variables | 30 String processing methods | 32 Conversion of string variables | 33 Executions of string commands | 34 Interface of MuPAD language | 35 Other commonly used data types | 36 Multidimensional arrays | 36 Cell arrays | 37 VIII | Contents 2.4.3 2.4.4 2.4.5 2.5 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.6 2.6.1 2.6.2 2.6.3 2.7 3.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.2 3.2.1 3.2.2 3.2.3 3.2.4 3.3 3.3.1 3.3.2 3.3.3 3.3.4 3.4 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.5 3.5.1 3.5.2 Tables | 38 Structured variables | 41 Other data types | 42 Fundamental statement structures | 42 Direct assignment statements | 42 Function call statements | 43 Functions with different syntaxes | 43 Colon expressions | 44 Submatrix extractions | 45 Generation of equally spaced row vectors | 46 Reading and writing of different data types | 46 Reading and writing of data files | 46 Low-level reading and writing commands | 47 Reading and writing of Excel files | 48 Problems | 50 Fundamental mathematical computations | 53 Algebraic computation of matrices | 53 Transposing, flipping and rotating matrices | 53 Arithmetic operations | 55 Complex matrices and transformations | 56 Powers and roots of matrices | 57 Dot operations | 59 Logic and comparison operations | 59 Logic operations with matrices | 59 Comparisons of matrices | 60 Searching commands in matrix elements | 60 Attribute judgement | 62 Computation of transcendental functions | 62 Exponentials and logarithmic functions | 63 Trigonometric functions | 63 Inverse trigonometric functions | 65 Transcendental functions of matrices | 66 Simplifications and conversions of symbolic expressions | 68 Polynomial operations | 68 Conversions and simplifications of trigonometric functions | 69 Simplification of symbolic expressions | 70 Variable substitution of symbolic expressions | 71 Conversions of symbolic expressions | 72 Fundamental computations with data | 72 Integer rounding and rationalization of data | 73 Sorting and finding maximum and minimum of vectors | 74 Contents | IX 3.5.3 3.5.4 3.5.5 3.6 Mean, variance and standard deviation | 75 Prime factors and polynomials | 76 Permutations and combinations | 78 Problems | 79 4.1 4.1.1 4.1.2 4.1.3 4.1.4 4.1.5 4.2 4.2.1 4.2.2 4.2.3 4.3 4.4 4.5 Flow control structures of MATLAB language | 83 Loop structures | 83 The for loop structure | 83 The while loop structure | 86 Loop implementation of iterations | 87 Assistant statements of loop structures | 90 Vectorized implementation of loops | 90 Conditional structures | 93 Simple conditional structures | 93 General form of conditional structures | 94 Vectorized expressions of piecewise functions | 96 Switch structures | 98 Trial structure | 100 Problems | 101 5.1 5.2 5.2.1 5.2.2 5.2.3 5.3 5.3.1 5.3.2 5.3.3 5.3.4 5.3.5 5.3.6 5.3.7 5.4 5.4.1 5.4.2 5.5 5.5.1 5.5.2 5.5.3 5.5.4 Function programming and debugging | 105 MATLAB scripts | 105 Fundamental structures of MATLAB functions | 106 Fundamental function structures | 106 Regulations in function names | 108 Examples of function programming | 108 Skills of MATLAB function programming | 112 Recursive structures | 112 Functions with variable numbers of inputs and outputs | 114 Fault tolerance manipulation | 116 Global variables | 117 Reading and writing of MATLAB workspace | 118 Anonymous and inline functions | 119 Subfunctions and private functions | 121 MATLAB function debugging | 122 Debugging of MATLAB functions | 122 Pseudocode and code protection | 125 MATLAB live editor | 125 Live editor interface | 126 Creating a live document | 126 Execution of embedded code | 128 Embed other objects in live editor | 128 X | Contents 5.5.5 5.6 Output of live files | 131 Problems | 131 6.1 6.1.1 6.1.2 6.1.3 6.1.4 6.1.5 6.2 6.2.1 6.2.2 6.2.3 6.3 6.3.1 6.3.2 6.3.3 6.3.4 6.3.5 6.3.6 6.3.7 6.3.8 6.4 6.4.1 6.4.2 6.5 6.6 6.6.1 6.6.2 6.6.3 6.6.4 6.6.5 6.7 6.7.1 6.7.2 6.8 Two-dimensional graphics | 135 Drawing two-dimensional plots | 135 Plotting data | 135 Plots of mathematical functions | 139 Plots of piecewise functions | 139 Titles in plots | 141 Plots with multiple vertical axes | 143 Decoration of plots | 145 Plot decoration with interface tools | 145 LATEX support commands | 146 Superimposing formulas in plots | 148 Other two-dimensional plotting functions | 149 Polar plots | 150 Plots of discrete samples | 151 Histograms and pie charts | 152 Filled plots | 155 Logarithmic plots | 156 Error bar plots | 157 Dynamic trajectories | 157 Two-dimensional animation | 158 Plot window partitioning | 159 Regular partitioning | 159 Arbitrary segmentation | 161 Implicit functions | 162 Displaying and simple manipulation of images | 165 Input images | 165 Editing and displaying images | 166 Color space conversion | 167 Edge detection | 167 Histogram equalization | 168 Output of MATLAB graphs | 170 Output menus and applications | 170 Output commands of plots | 171 Problems | 171 7.1 7.1.1 7.1.2 Three-dimensional graphics | 175 Three-dimensional curves | 175 Drawing three-dimensional plots from data | 175 Three-dimensional plots of mathematical functions | 176

Ngày đăng: 11/08/2020, 14:54

TỪ KHÓA LIÊN QUAN