Instructional materials


Chapter 6.

Genetic Algorithms Basics

An introduction to conventional genetic algorithms.

An excerpt from Carl Sagan's "Cosmos".

Picture of a Heike crab that was referred to in Carl Sagan's "Cosmos".

Japanese paintings depicting the sea battle at Danno-ura in the Japanese Inland Sea on April 24, 1185.

The Differential Evolution homepage.

Optimization using Storn's Differential Evolution algorithm.

MATLAB programs:

Script to use the Golden Section method to find the minimum of a function in one-dimension. Script is written specially for example 6.8 in the textbook.

A function to compute the value of the function used in example 6.8 in the above script.

A function using the Golden Section method to find the minimum of a function in one-dimension.

A function using the steepest descent method for multi-parameter optimization. Line search using the Armijo method is implemented.

A function to compute the Rosenbrock function (needed for the steepest descent method).

A function to compute the gradient of the Rosenbrock function (needed for the steepest descent method).

An implementation of a version of Storn's Differential Evolution algorithm.

Script file to run the above Differential Evolution program.

The Griewangk function used in the above script.

Script file to plot the Griewangk function in one-dimension.


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 dumber 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 Rational Function (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 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 12 - Application of Finite Fourier Transform.

A chapter from Prof. Cleve Moler's book: "Numerical Computing with Matlab" - using the FFT to study the Dual Tone Multi-Frequency system used in touch-tone phones, and to study sun-spots activities for the past 300 years.

You can use the program to explore the use of the FFT to study the Dual Tone Multi-Frequency system. This program needs to read in data from the following binary file. Please save this file in the same directory as the above Matlab program.

The Matlab GUI program allows you to explore various aspects of the DFT.

A Matlab program showing some of Matlab's sound processing capabilities.

To run the above program, you will need the Matlab program as well as the following 2 sound data files: fh.wav whistle.wav.


Chapter 4.

Eigenvalues and eigenvectors: What do they all mean.

A physical example using Java animation to elucidate the meaning of eigenvalues and eigenvectors.

MATLAB programs:

Using power iteration to compute the dominant eigenvalue and its corresponding eigenvector.

A function using normalized power iteration to compute the dominant eigenvalue and its corresponding eigenvector.

script to use the above function.

A function using inverse iteration to compute the least dominant eigenvalue and its corresponding eigenvector.

script to use the above function.

Using shifted inverse iteration to compute any eigenvalue and its corresponding eigenvector.

A function using power iteration and Rayleigh quotient to compute the dominant eigenvalue and its corresponding eigenvector.

A script to call and run the above function to compute the dominant eigenvalue and its corresponding eigenvector using power iteration and Rayleigh quotient.

A function implementing QR iteration to compute the eigenvalues.

script to compute the eigenvalues of a matrix using QR iteration.


Introduction to Steganography

Introduction to Steganography. Illustrate how images can be embedded in the least-significant bits of seemingly harmless image.

A Matlab program for the above example.


Application of Matrices over Finite Fields to Cryptography: Hill Cipher.

Illustration of matrices defined over a finite field, handling of character set and strings using the "Hill Cipher".

A Matlab function implementing the above example.

A Matlab function utilizing the above function to encrypt the text in a given text file.


Sparse Matrices

Lecture notes on the use of sparse matrices in Matlab.

Matlab program illustrating the use of sparse matrices.

An example to study the Bucky balls.


Lecture notes from Prof. Michael T. Heath