Back to Prof. Calhoun's Homepage

Scientific Computing with Matlab (Math 365)

In this course, we will learn how to use Matlab to solve problems in science and engineering using computational methods. We learn basic numerical methods, including solving linear systems, interpolation, quadrature rules, and solving ordinary differential equations. We also learn about visualizing output using Matlab graphing tools, programming concepts, and how to develop numerically efficient codes. This course does not assume any prior programming knowledge, although if you don't have any programming experience, you will find this course to be challenging initially.

Send me an e-mail

Please send me an e-mail at so that I can compile an e-mail list for the class. At the very least, include a subject header that says "Math 365". You may leave the message area blank, if you wish, or send me a short note about what you hope to get out of this course.

Basic course information

Instructor Prof. Donna Calhoun
Time Tues/Thurs 12:00-1:30
Place MG136 (Math Computing Lab)
Office Hours Thursday 1:15-2:45
Prerequesites Math 333 or Math 301

Return to top of page

Recommended and suggested textbooks

Return to top of page


Below are the slides from lecture material that I can make available online.

Week #1 (Aug. 21)
Tuesday --  Introduction to Scientific Computing; Arithmetic expressions
Lecture slides :
Introduction to the Scientific Computing  (pdf)
Using Matlab as a Scientific Calculator  (pdf)
In class lab :
Arithmetic expressions and elementary functions
Thursday --  Assigning Variables
Videos :

Tips on homework #0

Matlab as a graphing calculator (Part III)
In class lab :
Assigning variables and creating anonymous function handles
1d plotting in Matlab

Week #2 (Aug. 28)
Tues --  Graphing; working with arrays
Videos :

One dimensional arrays

Arithmetic expressions involving arrays
In class lab :
1d arrays
The 'dot' operator : Arithmetic expressions involving arrays
Thursday --  Loops in Matlab
In class lab :
The for-loop and vectorization

Week #3 (Sep. 4)
Tuesday --  1d Arrays - continued
In class lab :
The 'dot' operator : Arithmetic expressions involving arrays
Thursday --  More on arrays

Week #4 (Sep. 11)
Tuesday --  Root finding - Bisection
Thursday --  No class!

Week #5 (Sep. 18)
Tuesday --  Root finding - Fixed point, Newton's method
Thursday --  Root-finding; Minimization

Week #6 (Sep. 25)
Tuesday --  Using fzero; Introduction to solving linear systems
Lecture slides :
Numerical Linear Algebra in Science and Engineering  (pdf)
Introduction to Linear Algebra  (pdf)
In class lab :
Root-finding and minimization
Two dimensional arrays
Introduction to matrices and linear algebra
Solving linear systems

Week #7 (Oct. 2 )
Tuesday --  Gaussian Elimination
Thursday --  Quiz #1 : Circuit problem

Week #8 (Oct. 9)
Tuesday --  Gaussian Elimination for sparse systems
Thursday --  Timing matrix inversions.
Lecture slides :
Gaussian Elimination  (pdf)
The LU Decomposition  (pdf)

Week #9 (Oct. 16)
Tuesday --  Timing Gaussian Elimination
Other items of interest :
Timing results for matrix-matrix multiply (timing_results.png)
Thursday --  Operation counts; logspace;

Week #10 (Oct. 23)
Tuesday --  Using graphics handles
Codes written or demonstrated in class :
Thursday --  Linear regression; curve fitting
Lecture slides :
Vandermonde matrix system  (pdf)
Linear regression (linear least squares)  (pdf)
Fitting curves to data  (pdf)
In class lab :
Vandermonde matrix system for polynomial interpolation

Week #11 (Oct. 30)
Tuesday --  Lagrange Polynomial interpolation
Lecture slides :
Lagrange Interpolation Formula  (pdf)
Thursday --  Quiz #2
Other items of interest :
Plot for Quiz #2 (stars.png)

Week #12 (Nov. 6)
Tuesday --  Lagrange polynomials (cont.)
Thursday --  Barycentric Formula
Lecture slides :
The Barycentric Formula  (pdf)
Codes written or demonstrated in class :

Week #13 (Nov. 13)
Tuesday --  Piecewise polynomial interpolation
Lecture slides :
Piecewise Polynomial Interpolation  (pdf)
In class lab :
Piecewise polynomial interpolation
Thursday --  Quiz #3 : Polynomial interpolation
Codes written or demonstrated in class :

Week #14 (Nov. 27)
Tuesday --  Quadrature Rules
Codes written or demonstrated in class :
Thursday --  Quadrature rules; Solving ODEs

Week #15 (Dec. 4)
Tuesday --  ODEs, continued.
Codes written or demonstrated in class :
Thursday --  Fractals
Codes written or demonstrated in class :
Some useful or interesting links
(Julia set Fractal (2d))
(Best Fractal Zoom Ever)

Week #16 (Dec. 12)
Tuesday --  Quiz #4 (Final Quiz)
Codes written or demonstrated in class :

Return to top of page

Homework assignments

Homework projects are officially due at 5PM on the dates listed below, but will be accepted until two days after, without a late penalty. So, if the homework is officially due on Friday at 5PM, you have until Sunday at 5PM to turn it in without penalty. A penalty of 10% will be incurred for every two days your homework is beyond the grace period deadline. You'll turn in your homeworks in your assigned Dropbox folders. Please read the Homework Tips before turning in your homework!

Homework #0

Due Sep. 1

Assignment :
Other resources :
hmwk0_sample.pdf  -- Use this as an example of how to format your homework
hmwk0.m  -- This is a template to get you started.
Comments : Your goal with this assignment is to reproduce the solutions given in hmwk0_sample.pdf. To learn more about the Matlab Publish command, do a 'help publish' in Matlab.

Homework #1

Due Sept. 8

Assignment :
Other resources :
hmwk1.m  -- Homework template
WA-NES-J1M4_Okanogan_Complex_8-23-2015_2333.kml  -- Open this file in Google Earth to see the perimeter of the Okanogan Complex fire
Updates to homework :
 --  (8/31/2017) Fixed iterates in problem 5
Some useful or interesting links
You can download more fire perimeter files from this site. (Look for the small Google Earth icon, near the right side bar for perimeter files from different days.) (InciWeb - Incident Information System)
Comments : For these problems, you will write output files using the script "write_file"

Homework #2

Due Sept. 29

Assignment :
Other resources :
hmwk2_template.m  -- Homework template
Updates to homework :
 --  (9/28/2017) Re-worded problem #3 for clarification.

Homework #3

Due Oct. 13

Assignment :
Other resources :
hmwk3_template.m  -- Homework #3 template
lab_demo_solns.pdf  -- Practice circuits problem (with solutions)
Chapter2-part.pdf  -- Description of circuit problem from Strang's Linear Algebra text

Homework #4

Due 10/27

Assignment :
Other resources :

Homework #5

Due Nov. 28

Assignment :
Other resources :
Updates to homework :
 --  (11/25/2017) Red/black were reversed in plot 3, page 2; now fixed

Homework #6

Due Dec. 12

Assignment :
Other resources :

Return to top of page

Matlab Tutorials

An online tutorial for this course, including all of the in-class labs can be found at the link below

Matlab Tutorial

Return to top of page

Final Project

Our final activity will be a quiz during the day of our final

Return to top of page

Grading policy

Homework projects (including the final activity) will count for 80% of your final grade, quizzes will count towards 20% of your grade. All homeworks will be equally weighted.

Return to top of page