| |
| |
| |
Simple Calculations with MATLAB | |
| |
| |
| |
Introduction and a Word of Warning | |
| |
| |
| |
Scalar Quantities and Variables | |
| |
| |
| |
Rules for Naming of Variables | |
| |
| |
| |
Precedence: The Order in Which Calculations Are Performed | |
| |
| |
| |
Mathematical Functions | |
| |
| |
| |
Format: The Way in Which Numbers Appear | |
| |
| |
| |
Vectors in MATLAB | |
| |
| |
| |
Initialising Vector Objects | |
| |
| |
| |
Manipulating Vectors and Dot Arithmetic | |
| |
| |
| |
Setting Up Mathematical Functions | |
| |
| |
| |
Some MATLAB Specific Commands | |
| |
| |
| |
Looking at Variables and Their Sizes | |
| |
| |
| |
Accessing Elements of Arrays | |
| |
| |
| |
Tasks | |
| |
| |
| |
Writing Scripts and Functions | |
| |
| |
| |
Creating Scripts and Functions | |
| |
| |
| |
Functions | |
| |
| |
| |
Brief Aside | |
| |
| |
| |
Plotting Simple Functions | |
| |
| |
| |
Evaluating Polynomials and Plotting Curves | |
| |
| |
| |
More on Plotting | |
| |
| |
| |
Functions of Functions | |
| |
| |
| |
Errors | |
| |
| |
| |
Numerical Errors | |
| |
| |
| |
User Error | |
| |
| |
| |
Tasks | |
| |
| |
| |
Loops and Conditional Statements | |
| |
| |
| |
Introduction | |
| |
| |
| |
Loops Structures | |
| |
| |
| |
Summing Series | |
| |
| |
| |
Sums of Series of the Form [characters not reproducible] j[superscript p], p [set membership] [characters not reproducible] | |
| |
| |
| |
Summing Infinite Series | |
| |
| |
| |
Summing Series Using MATLAB Specific Commands | |
| |
| |
| |
Loops Within Loops (Nested) | |
| |
| |
| |
Conditional Statements | |
| |
| |
| |
Constructing Logical Statements | |
| |
| |
| |
The MATLAB Command switch | |
| |
| |
| |
Conditional loops | |
| |
| |
| |
The break Command | |
| |
| |
| |
MATLAB Specific Commands | |
| |
| |
| |
Error Checking | |
| |
| |
| |
Tasks | |
| |
| |
| |
Root Finding | |
| |
| |
| |
Introduction | |
| |
| |
| |
Initial Estimates | |
| |
| |
| |
Fixed Point Iteration | |
| |
| |
| |
Bisection | |
| |
| |
| |
Newton-Raphson and Secant Methods | |
| |
| |
| |
Derivation of the Newton-Raphson Method | |
| |
| |
| |
Repeated Roots of Functions | |
| |
| |
| |
Zeros of Higher-Dimensional Functions(*) | |
| |
| |
| |
MATLAB Routines for Finding Zeros | |
| |
| |
| |
Roots of a Polynomial | |
| |
| |
| |
The Command fzero | |
| |
| |
| |
Tasks | |
| |
| |
| |
Interpolation and Extrapolation | |
| |
| |
| |
Introduction | |
| |
| |
| |
Saving and Reading Data | |
| |
| |
| |
Which Points to Use? | |
| |
| |
| |
Newton Forward Differences and Lagrange Polynomials | |
| |
| |
| |
Linear Interpolation/Extrapolation | |
| |
| |
| |
Calculating Interpolated and Extrapolated Values | |
| |
| |
| |
Splines | |
| |
| |
| |
Curves of Best Fit | |
| |
| |
| |
Interpolation of Non-Smooth Data | |
| |
| |
| |
Insufficient Data Points | |
| |
| |
| |
Minimisation of Functions and Parameter Retrieval | |
| |
| |
| |
Parameter Retrieval | |
| |
| |
| |
Using fmins for Parameter Retrieval | |
| |
| |
| |
Tasks | |
| |
| |
| |
Matrices | |
| |
| |
| |
Introduction | |
| |
| |
| |
Initialising Matrices Within MATLAB | |
| |
| |
| |
Matrix Operations | |
| |
| |
| |
Operations on Elements of Matrices | |
| |
| |
| |
More on Special Matrices | |
| |
| |
| |
Matrices Containing Strings | |
| |
| |
| |
Properties of Matrices and Systems of Equations | |
| |
| |
| |
Determinants of Matrices | |
| |
| |
| |
Elementary Row Operations | |
| |
| |
| |
Solving Many Equations at Once | |
| |
| |
| |
Matrix Decomposition | |
| |
| |
| |
Eigenvalues and Eigenvectors | |
| |
| |
| |
Specific MATLAB Commands | |
| |
| |
| |
Characteristic Polynomials | |
| |
| |
| |
Exponentials of Matrices | |
| |
| |
| |
Tasks | |
| |
| |
| |
Numerical Integration | |
| |
| |
| |
Introduction | |
| |
| |
| |
Integration Using Straight Lines | |
| |
| |
| |
Errors in the Trapezium Method | |
| |
| |
| |
Integration Using Quadratics | |
| |
| |
| |
Integration Using Cubic Polynomials | |
| |
| |
| |
Integrating Using MATLAB Commands | |
| |
| |
| |
Specific Examples of Integrals | |
| |
| |
| |
Infinite Integrals and Removable Singularities | |
| |
| |
| |
Indefinite Integrals | |
| |
| |
| |
Tasks | |
| |
| |
| |
Solving Differential Equations | |
| |
| |
| |
Introduction | |
| |
| |
| |
Euler's Method and Crank-Nicolson | |
| |
| |
| |
Analytical Comparisons | |
| |
| |
| |
Banded Matrices | |
| |
| |
| |
Runge-Kutta Methods | |
| |
| |
| |
Higher-Order Systems | |
| |
| |
| |
Second-Order Systems | |
| |
| |
| |
Bessel's equation | |
| |
| |
| |
Airy's Equation | |
| |
| |
| |
Shooting Methods | |
| |
| |
| |
Boundary-Value Problems | |
| |
| |
| |
Population Dynamics | |
| |
| |
| |
Eigenvalues of Differential Systems | |
| |
| |
| |
Tasks | |
| |
| |
| |
Simulations and Random Numbers | |
| |
| |
| |
Introduction | |
| |
| |
| |
Statistical quantities | |
| |
| |
| |
Averages | |
| |
| |
| |
Other Statistical Measures | |
| |
| |
| |
Random Numbers and Distributions | |
| |
| |
| |
Normal Distribution | |
| |
| |
| |
Calculating Probabilities | |
| |
| |
| |
Permutations | |
| |
| |
| |
Maps and White Noise | |
| |
| |
| |
Modelling Discrete Systems | |
| |
| |
| |
Periodicity and Chaos | |
| |
| |
| |
Random Motion | |
| |
| |
| |
Tasks | |
| |
| |
| |
A Mathematical Introduction to Matrices | |
| |
| |
| |
Special Matrices | |
| |
| |
| |
Inverses of Matrices | |
| |
| |
| |
Glossary of Useful Terms | |
| |
| |
| |
Arithmetic and Logical Operators | |
| |
| |
| |
Symbols | |
| |
| |
| |
Plotting Commands | |
| |
| |
| |
General MATLAB Commands | |
| |
| |
| |
Solutions to Tasks | |
| |
| |
| |
Solutions for Tasks from Chapter 1 | |
| |
| |
| |
Solutions for Tasks from Chapter 2 | |
| |
| |
| |
Solutions for Tasks from Chapter 3 | |
| |
| |
| |
Solutions for Tasks from Chapter 4 | |
| |
| |
| |
Solutions for Tasks from Chapter 5 | |
| |
| |
| |
Solutions for Tasks from Chapter 6 | |
| |
| |
| |
Solutions for Tasks from Chapter 7 | |
| |
| |
| |
Solutions for Tasks from Chapter 8 | |
| |
| |
| |
Solutions for Tasks from Chapter 9 | |
| |
| |
Index | |