Back to Prof. Calhoun's Homepage

Scientific Computing with Matlab (Math 365)

In this course, we will learn how to use Matlab for applying computational methods to solving problems from science and engineering. 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.

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 Monday/Wednesday 1:30-2:45 and 3:00-4:15
Place B210 (Riverfront Building)
Office Hours Wednesday 4:30PM-5:30PM
Prerequesites Math 175

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 (Jan. 12)
Monday --  Introduction to Scientific Computing
Lecture slides :
Introduction to the Scientific Computing  (pdf)
Using Matlab as a Scientific Calculator  (pdf)
In class lab :
Arithmetic expressions and elementary functions
Wednesday --  Assigning Variables; Tips for doing Homework #0
Codes written or demonstrated in class :
In class lab :
Assigning variables and creating anonymous function handles

Week #2 (Jan. 19)
Monday --  Martin Luther King Day (no class)
Wednesday --  Creating 1d plots in Matlab
Videos :

One dimensional arrays

Arithmetic expressions involving arrays

Matlab as a graphing calculator (Part III)
In class lab :
One dimensional arrays
Arithmetic expressions involving arrays
Matlab as a graphing scientific calculator (Part III)

Week #3 (Jan. 26)
Monday --  1d Arrays (continued)
Codes written or demonstrated in class :
Wednesday --  Quiz #1; The for-loop and 2d arrays
In class lab :
The for-loop and vectorization
Two dimensional arrays

Week #4 (Feb. 2)
Monday --  2d arrays (continued)
Wednesday --  Solving linear systems
Lecture slides :
Numerical Linear Algebra in Science and Engineering  (pdf)
Introduction to Linear Algebra  (pdf)
In class lab :
Introduction to matrices and linear algebra

Week #5 (Feb. 9)
Monday --  Gaussian Elimination
Lecture slides :
Gaussian Elimination  (pdf)
Codes written or demonstrated in class :
In class lab :
Solving linear systems
Wednesday --  Quiz #2; Gaussian Elimination

Week #6 (Feb. 16)
Monday (no class) --  President's Day
Wednesday (no class) --  Timing a linear solve
Videos :

Gaussian Elimination

Solving a linear system using Matlab; Timing experiments

Week #7 (Feb. 23)
Monday --  Timing operations in Matlab
Codes written or demonstrated in class :
Other items of interest :
Wednesday --  Accuracy of the temperature equation u''(x)=f(x)

Week #8 (Mar. 2)
Monday --  Fitting curves to data
Lecture slides :
Linear regression (linear least squares)  (pdf)
Codes written or demonstrated in class :
Wednesday --  Polynomial Interpolation
Lecture slides :
Fitting curves to data  (pdf)
Lecture slides :
Polynomial Interpolation  (pdf)
Codes written or demonstrated in class :

Week #9 (Mar. 9)
Monday --  Using the Lagrange interolating polynomial
Lecture slides :
Vandermonde systems  (pdf)
Lagrange Interpolation  (pdf)
In class lab :
Lagrange Polynomials
Wednesday --  The Barycentric Formula
Lecture slides :
The Barycentric Formula  (pdf)

Week #10 (Mar. 16)
Monday (no class) -- 
Videos :

Polynomial interpolation and Lagrange Polynomials
Wednesday (no class) --  Barycentric Formula
Videos :

The Barycentric formula

Week #11 (Mar. 30)
Monday -- 
Codes written or demonstrated in class :
Wednesday -- 
Lecture slides :
Piecewise Polynomial Interpolation  (pdf)
Codes written or demonstrated in class :

Week #12 (Apr. 6)
Monday --  Piecewise cubic splines
In class lab :
Piecewise polynomial interpolation
Wednesday --  Piecewise polynomial interpolation (cont)

Week #13 (Apr. 13)
Monday --  Geometry of curves
Lecture slides :
The geometry of curves  (pdf)
Wednesday --  Introduction to Rootfinding
Lecture slides :
Rootfinding : Bisection  (pdf)

Week #14 (Apr. 20)
Monday --  Function minimization : The Golden line search method; fminbnd
Codes written or demonstrated in class :
Wednesday --  Introduction to Quadrature Rules
Codes written or demonstrated in class :

Week #15 (Apr. 27)
Monday --  Solving differential equations
Codes written or demonstrated in class :
Wednesday --  Solving ordinary differential equations

Return to top of page

Homework assignments

Homework projects are officially due on the Wednesday due date at 5PM, but will be accepted until Friday 5PM, without a late penalty. A penalty of 10% will be incurred for every two days your homework is late. You'll turn in your homeworks in your assigned Dropbox folders. Unless otherwise stated, homeworks will all be turned in individually.

Please read the Homework Tips before turning in your homework!

Homework #0

Due Jan. 21

Assignment :
Other resources :
hmwk0_solns.pdf  -- Use this as an example of how to format your homework
Comments : Your goal with this assignment is to reproduce the solutions above! To learn more about the Matlab Publish command, do a 'help publish' in Matlab.

Homework #1

Due Feb. 4

Assignment :
Other resources :
rimfire.dat  -- Coordinates for the outline of the Rim Fire
write_file.m  -- Write out solutions in the homework with this file
Comments : For these problems, you will write output files using the script "write_file"

Homework #2

Due Feb. 25

Assignment :
Other resources :
Chapter2-part.pdf  -- Section from Chapter 2 of Strang's Linear Algebra and its Applications
Updates to homework :
 --  (2/11) Minor changes to problem #1 - "conductance", not "capacitance"!

Homework #3

Due Mar. 11

Assignment :
Other resources :
homework_tips.pdf  -- Please read these helpful tips
ec1.pdf  -- Extra Credit problem
Updates to homework :
 --  (3/2) Added additional homework problem on linear least squares
 --  (3/5) Modified description for Problem #2.

Homework #4

Due Apr. 1

Assignment :
Other resources :

Homework #5

Due Apr. 15

Assignment :
Other resources :
Some useful or interesting links
An article about the history of the inverse square function in computer graphics and video games (Origin of Quake3's Fast InvSqrt())
A nice description of how Julia sets are generated (Julia Jewels: An exploration of Julia sets)
Wikipedia entry on generating Newton Fractals (Newton Fractals)

Homework #6

Due Apr. 29

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

In lieu of a final, you will have a final project due, on the day of our scheduled exam.

Other resources :
final_project.pdf  -- Final project description

You can find the Final Exam calendar here.

Return to top of page

Grading policy

Homework projects will count for 60% of your final grade, quizzes will count towards 20% of your grade, and the final project will be 20% of your final grade. All homeworks will be equally weighted.

Return to top of page