Preface
1Introduction to MATLAB
1.1 The Golden Ratio
1.2 Fibonacci Numbers
1.3 Fractal Fern
1.4 Magic Squares
1.5 Cryptography
1.6 The 3n+1 Sequence
1.7 Floating-Point Arithmetic
1.8 Further Reading
Exercises
2 Linear Equations
2.1 Solving Linear Systems
2.2 The MATLAB Backslash Operator
2.3 A 3-by-3 Example
2.4 Permutation and Triangular Matrices
2.5 LU Factorization
2.6 Why Is Pivoting Necessary?
2.7 lutx, bslashtx, lugui
2.8 Effect of Roundoff Errors
2.9 Norms and Condition Numbers
2.10 Sparse Matrices and Band Matrices
2.11 PageRank and Markov Chains
2.12 Further Reading
Exercises
3 Interpolation
3.1 The Interpolating Polynomial
3.2 Piecewise Linear Interpolation
3.3 Piecewise Cubic Hermite Interpolation
3.4 Shape-Preserving Piecewise Cubic
3.5 Cubic Spline
3.6 pchiptx, splinetx
3.7 interpgui
Exercises
4 Zeros and Roots
4.1 Bisection
4.2 Newton's Method
4.3 A Perverse Example
4.4 Secant Method
4.5 Inverse Quadratic Interpolation
4.6 Zeroin
4.7 fzerotx
4.8 fzerogui
4.9 Value Finding and Reverse Interpolation
4.10 Optimization and fmintx
Exercises
5 Least Squares
5.1 Models and Curve Fitting
5.2 Norms
5.3 censusgui
5.4 Householder Reflections
5.5 The QR Factorization
5.6 Pseudoinverse
5.7 Rank De ciency
5.8 Separable Least Squares
5.9 Further Reading
Exercises
6 Quadrature
6.1 Adaptive Quadrature
6.2 Basic Quadrature Rules
6.3 quadtx, quadgui
6.4 Specifying Integrands
6.5 Performance
6.6 Integrating Discrete Data
6.7 Further Reading
Exercises
7 Ordinary Differential Equations 193
7.1 Integrating Differential Equations
7.2 Systems of Equations
7.3 Linearized Differential Equations
7.4 Single-Step Methods
7.5 The BS23 Algorithm
7.6 ode23tx
7.7 Examples
7.8 Lorenz Attractor
7.9 Stiffness
7.10 Events
7.11 Multistep Methods
7.12 The MATLAB ODE Solvers
7.13 Errors
7.14 Performance
7.15 Further Reading
Exercises
8 Fourier Analysis
8.1 Touch-Tone Dialing
8.2 Finite Fourier Transform
8.3 fftgui
8.4 Sunspots
8.5 Periodic Time Series
8.6 Fast Finite Fourier Transform
8.7 ffttx
8.8 fftmatrix
8.9 Other Fourier Transforms and Series
8.10 Further Reading
Exercises