477/577 Handouts and Worksheets
Crash course in MATLAB (Version 7) (pdf)
(by Toby Driscoll)
A Practical Introduction to Matlab (Version 5) (html version)
(by Mark Gockenbach) or
Postscript version
For more introductory material and tutorials see
the main course page
Additional
reading
Introductory Matlab scripts
basic_definitions.m
(script that calls all other files. Note, however, that each file below can also be executed separately.)
matrix_vector.m
(definition of matrices and vectors)
arithmetic.m
(simple arithmetic with matrices and vectors)
lin_sys.m
(solving linear systems)
submatrices.m
(definition of submatrices)
statistics.m
(timing in Matlab)
loops.m
(for-loops, and why to avoid them)
plotting.m
(simple plotting)
user_defined_functions.m
(how to use user-defined functions)
circle.m
(a user-defined function)
inline_functions.m
(how to use inline functions)
anonymous_functions.m
(how to use anonymous functions)
basics.zip
(.zip file containing all of the files above)
Chapter 1
of class notes
Chapter 2
of class notes
Matlab scripts for simple image compression
lu_compression.m
(image compression based on partial LU decomposition)
qr_compression.m
(image compression based on partial QR decomposition)
svd_compression.m
(image compression based on partial singular value decomposition)
Chapter 3
of class notes
Chapter 4
of class notes
GramSchmidt.m
(Example 2 in Trefethen/Bau, Sect.9. Requires two additional m-files clgs.m and mgs.m to be supplied by the user)
Chapter 5
of class notes
Matlab scripts for polynomial least squares fitting
PolynomialLSQ.m
(Matlab function that computes and plots polynomial interpolant / least-squares fit)
PolynomialDemo.m
(Matlab script that calls PolynomialLSQ.m)
Polynomial.zip
(.zip file containing the two files above)
Chapter 6
of class notes
473_stability.mws
(Maple worksheet that illustrates stable and unstable algorithms)
Matlab scripts to illustrate stability of least squares algorithms
LSQ_Stability_book.m
(Matlab script that does stability examples from Trefethen/Bau Sect.19)
LSQ_Stability.m
(same as above with different function to be fitted)
Chapter 7
of class notes (with a few typos corrected on Oct.11)
473_LU.mws
(Maple worksheet that motivates LU factorization and partial pivoting)
Chapter 8
of class notes
Chapter 9
of class notes
473_Hessenberg.mws
(Maple worksheet that illustrates use of Householder reflections for reduction to upper Hessenberg form)
Chapter 10
of class notes
RayleighQuotient.m
(Matlab script) to compare convergence of inverse iteration and Rayleigh quotient iteration)
Chapter 11
of class notes
Chapter 12
of class notes
Chapter 13
of class notes
473_IterativeSolvers.mws
(Maple worksheet that illustrates classical iterative linear system solvers)
Chapter 14
of class notes
GMRESDemo.m
(Matlab script that demonstrates convergence of the GMRES method)
Chapter 15
of class notes
An Introduction to the Conjugate Gradient Method Without the Agonizing Pain (pdf)
(by Jonathan Shewchuk)
Chapter 16
of class notes
Matlab scripts to illustrate the conjugate gradient algorithm
CGDemo.m
(Matlab script that demonstrates convergence of the conjugate gradient method)
PCGDemo.m
(Matlab script that compares conjugate gradient method with and without preconditioning)
Chapter 17
of class notes (updated Nov.30)
Chart of iterative solvers
(as listed in "Applied Numerical Linear Algebra" by James Demmel)
Matlab scripts to illustrate Gauss-Newton method for nonlinear least squares (from Charles Van Loan's "Introduction to Scientific Computing", see also
here
)
ShowGN_VL.m
(main Matlab script that demonstrates illustrates the Gauss-Newton method)
rho_Vl.m
(Matlab function needed by ShowGN_VL.m)
Jrho_Vl.m
(Matlab function needed by ShowGN_VL.m)
Orbit_Vl.m
(Matlab function needed by ShowGN_VL.m)
GNStep_Vl.m
(Matlab function needed by ShowGN_VL.m)
Matlab functions for Problem 9 of the MATH 477 Final Exam
F1.m
F2.m
F3.m
Problem11.zip
(.zip file containing the three above files)
Last updated: December 7, 2006
Greg Fasshauer
(fasshauer at iit.edu)