Preface |
|
ix | |
|
|
1 | (4) |
|
|
1 | (1) |
|
1.2 MATLAB®: What and Why? |
|
|
2 | (1) |
|
|
3 | (1) |
|
|
4 | (1) |
|
|
5 | (16) |
|
2.1 Unidimensional Arrays: Vectors |
|
|
5 | (1) |
|
2.2 Bidimensional Arrays: Matrices |
|
|
6 | (1) |
|
|
7 | (2) |
|
2.4 Systems of Linear Equations |
|
|
9 | (4) |
|
2.5 Eigenvalues and Eigenvectors |
|
|
13 | (4) |
|
|
17 | (2) |
|
|
19 | (2) |
|
|
21 | (36) |
|
3.1 Defining and Using Scalar Variables |
|
|
21 | (5) |
|
3.2 Saving and Reloading the Workspace |
|
|
26 | (1) |
|
3.3 Defining and Using Arrays |
|
|
27 | (4) |
|
3.4 Operations on Vectors and Matrices |
|
|
31 | (5) |
|
3.5 More on Plotting Functions of One Variable |
|
|
36 | (5) |
|
3.6 Loops and Logical Operators |
|
|
41 | (4) |
|
3.7 Working with Indices and Arrays |
|
|
45 | (1) |
|
3.8 Organizing Your Outputs |
|
|
46 | (2) |
|
3.9 Number Representation |
|
|
48 | (3) |
|
|
51 | (3) |
|
|
54 | (3) |
|
4 Solving Nonlinear Equations |
|
|
57 | (22) |
|
4.1 The Bisection Method for Root-Finding |
|
|
57 | (2) |
|
4.2 Convergence Criteria and Efficiency |
|
|
59 | (4) |
|
4.3 Scripts and Function Files |
|
|
63 | (4) |
|
4.4 The False Position Method |
|
|
67 | (1) |
|
4.5 The Newton-Raphson Method for Root-Finding |
|
|
67 | (6) |
|
4.6 Fixed Point Iteration |
|
|
73 | (2) |
|
4.7 MATLAB® Built-in Functions |
|
|
75 | (1) |
|
|
76 | (3) |
|
|
79 | (20) |
|
|
79 | (10) |
|
5.2 Newton's Method for Nonlinear Systems |
|
|
89 | (4) |
|
5.3 MATLAB® Built-in Functions |
|
|
93 | (2) |
|
|
95 | (4) |
|
6 Approximation of Functions |
|
|
99 | (44) |
|
6.1 A Hypothetical Example |
|
|
99 | (7) |
|
6.2 Global Polynomial Interpolation |
|
|
106 | (16) |
|
|
122 | (8) |
|
6.4 Approximation with Trigonometric Functions |
|
|
130 | (2) |
|
6.5 MATLAB® Built-in Functions |
|
|
132 | (5) |
|
|
137 | (6) |
|
7 Numerical Differentiation |
|
|
143 | (16) |
|
7.1 Basic Derivative Formulae |
|
|
143 | (4) |
|
7.2 Derivative Formulae Using Taylor Series |
|
|
147 | (2) |
|
7.3 Derivative Formulae Using Interpolants |
|
|
149 | (1) |
|
7.4 Errors in Numerical Differentiation |
|
|
150 | (3) |
|
7.5 Richardson Extrapolation |
|
|
153 | (2) |
|
7.6 MATLAB® Built-in Functions |
|
|
155 | (1) |
|
|
156 | (3) |
|
|
159 | (28) |
|
8.1 The Need for Optimization Methods |
|
|
159 | (1) |
|
|
160 | (3) |
|
8.3 Successive Parabolic Interpolation |
|
|
163 | (1) |
|
8.4 Optimization Using Derivatives |
|
|
164 | (9) |
|
|
173 | (6) |
|
8.6 Constrained Nonlinear Optimization |
|
|
179 | (2) |
|
8.7 MATLAB® Built-in Functions |
|
|
181 | (3) |
|
|
184 | (3) |
|
|
187 | (22) |
|
9.1 Basic Quadrature Formulae |
|
|
187 | (5) |
|
|
192 | (4) |
|
9.3 Extrapolation Methods: Romberg Quadrature |
|
|
196 | (3) |
|
9.4 Higher-Dimensional Integrals |
|
|
199 | (3) |
|
9.5 Monte Carlo Integration |
|
|
202 | (3) |
|
9.6 MATLAB® Built-in Functions |
|
|
205 | (1) |
|
|
206 | (3) |
|
10 Numerical Solution of Differential Equations |
|
|
209 | (28) |
|
|
209 | (5) |
|
|
214 | (1) |
|
10.3 Basic Numerical Methods |
|
|
215 | (3) |
|
10.4 Global Error and the Order of Accuracy |
|
|
218 | (4) |
|
10.5 Consistency, Stability and Convergence |
|
|
222 | (4) |
|
10.6 Explicit vs. Implicit Methods |
|
|
226 | (1) |
|
|
227 | (1) |
|
10.8 Higher-Order Initial Value Problems |
|
|
228 | (1) |
|
10.9 Boundary Value Problems |
|
|
229 | (2) |
|
10.10 MATLAB® Built-in Functions |
|
|
231 | (1) |
|
|
232 | (5) |
|
Appendix A Calculus Refresher |
|
|
237 | (4) |
|
|
237 | (1) |
|
|
238 | (1) |
|
A.3 Other Important Results |
|
|
239 | (2) |
|
Appendix B Introduction to Octave |
|
|
241 | (2) |
|
B.1 The Problem of Choice |
|
|
241 | (1) |
|
|
241 | (1) |
|
|
242 | (1) |
|
Appendix C Introduction to Python |
|
|
243 | (12) |
|
C.1 The Problem of Choice |
|
|
243 | (1) |
|
|
243 | (2) |
|
|
245 | (1) |
|
|
245 | (10) |
|
Appendix D Introduction to Julia |
|
|
255 | (6) |
|
D.1 The Problem of Choice |
|
|
255 | (1) |
|
|
255 | (1) |
|
|
256 | (5) |
|
Appendix E Hints and Answers for Selected Exercises |
|
|
261 | (6) |
Bibliography |
|
267 | (2) |
Index |
|
269 | |