Instructional materials


MATLAB Basics

Here are some nice slides from Prof. James Sutherland

 

Other Tutorials On the Web


Chapter 1.

MATLAB program for example 1.3

Download this program and modify it for homework problem 2.

Quadratic Formula - A naive implementation

Quadratic Formula - A better implementation

Notes on the Forward Difference Formula for the derivative of a function

Investigate the trade-off between truncation and rounding errors

Notes on the Centered Difference Formula for the derivative of a function

Investigate the trade-off between truncation and rounding errors


Chapter 2.

MATLAB programs:

Back-substitution

Forward-substitution

Gauss Elimination without Pivoting

LU Factorization using Gauss Elimination without Pivoting

Script to test LU Factorization using Gauss Elimination without Pivoting

LU Factorization using Gauss Elimination with Partial Pivoting

Script to test LU_pivot.m

Cholesky Fatorization

Script to test Cholesky.m

Rank-one Updating

LU Factorization for a tridiagonal matrix

Notes on: Avoid explicitly computing the inverse of a matrix

Problem statement

Computing A inverse times B

Notes on the Sherman-Morrison Formula

A More Direct Derivation

Hands-on exercise for February 6, 2003: Gaussian Elimination with and without Pivoting

Behavior of the errors


Chapter 5.

MATLAB programs:

Function or Fixed-Point Iteration

Bisection Method (hardwired function)

Bisection Method (inline function)

Bisection Method (implemented as a function)

Newton's Method

Newton's Method (comparing the case of simple and double roots)

Halley's Method

Secant Method

Inverse Interpolation

Linear Fractional Interpolation

Multi-Dimensional Newton's Method

Broyden's Method

 

Notes on Halley's Method

Halley's method is a generalization of Newton's Method with higher convergence rates.


Chapter 7.

MATLAB programs:

Monomial Basis Functions

Interpolation using Monomial Basis Functions

Lagrange Basis Functions

Divided Differences

Divided Difference (a better implementation)

Newton's Interpolation

Horner's Method for evaluating polynomials

A dumb way to evaluate polynomials

An even doumber way to evaluate polynomials

Horner's Method for evaluating polynomials with a shift

Problem interpolating a noisy straight line using polynomials

Problem with interpolation using a single polynomial of high degree

Interpolation using Rational Function

Interpolation using RationalFunction (improved implementation)

Testing Rational Function interpolation

Natural Cubic Spline

Matlab Function for Natural Cubic Spline

Another example of the Natural Cubic Spline

An example using Parametric Cubic Spline

A second example using Parametric Natural Cubic Spline

A third example using Parametric Cubic Spline

Notes on Divided Differences

Divided Differences method to construct Newton's interpolant.

Notes on Rational Function Interpolation

Rational Function interpolation.

Notes on Cubic Spline

Interpolation using the cubic spline.

Notes on Parametric Cubic Spline

Interpolation using parametric cubic spline.


Chapter 12.

MATLAB programs:

Danielson-Lanczos FFT

Script to test the above implementation of the Danielson-Lanczos FFT

A demo for using FFT in data analysis

Notes on Fourier Transform

Fourier Transform of Discretely Sampled Data.


Chapter 8.

MATLAB programs:

Midpoint Quadrature Rule

Trapezoid Quadrature Rule

Simpson's Quadrature Rule

Script to test various quadrature rules

8-Point Gauss-Legendre Quadrature

24-Point Gauss-Legendre Quadrature

48-Point Gauss-Legendre Quadrature

Adaptive quadrature based on Simpson's rule

Adaptive quadrature based on the Gauss-Legendre Quadrature rule

Forward Difference Formula for the first derivative

Richardson Extrapolation

Richardson Extrapolation to accelerate the computation of Pi according to Archemedes

Romberg Quadrature

Script to test Romberg quadrature

A problematic function used to test various quadrature rules

A function used to test various quadrature rules


Chapter 3.

MATLAB programs:

Analyse Motion under gravity using normal equation

Analyse peak height of hills using normal equation

Fitting a noisy straight line

Study the condition-squaring effect

Householder QR decomposition

Testing Householder QR decomposition

Example 3.17

Example 3.18

Example 3.20

Example 3.21 - Total least squares

A rank deficient matrix

Example 3.14 - using svd

Studying the orbit of a planet

Function to plot part of an elliptical orbit


Lecture notes from Prof. Michael T. Heath