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 donnacalhoun@boisestate.edu 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


Lectures

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 :
handles_demo.m
legend_demo.m
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 :
lagrange_demo.m

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 :
spline_demo_extra.m
spline_demo_deriv.m

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

Week #15 (Dec. 4)
Tuesday --  ODEs, continued.
Codes written or demonstrated in class :
ode_demo.m
Thursday --  Fractals
Codes written or demonstrated in class :
newton3_demo.m
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 :
quiz4.m
minnie_xy.dat

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 :
hmwk0.pdf
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.
heights.dat
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 :
hmwk1.pdf
Other resources :
hmwk1.m  -- Homework template
o1.dat
o2.dat
o3.dat
o4.dat
o5.dat
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 :
hmwk2.pdf
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 :
hmwk3.pdf
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 :
hmwk4.pdf
Other resources :
hmwk4_data_template.m
hmwk4_template.m
H2Odensity.dat

Homework #5

Due Nov. 28

Assignment :
hmwk5.pdf
Other resources :
hmwk5_template.m
dq1.dat
dq2.dat
snow.dat
Updates to homework :
 --  (11/25/2017) Red/black were reversed in plot 3, page 2; now fixed

Homework #6

Due Dec. 12

Assignment :
hmwk6.pdf
Other resources :
hmwk6_template.m
compute_geometry.m
julia_fractals.m
newton_fractals.m

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