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 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 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


Lectures

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 :
hmwk0.m
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 :
circle.m
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 :
lab_demo_solns.pdf
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 :
dot_time.m
Other items of interest :
timing_results.png
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 :
llsq_demo.m
Wednesday --  Polynomial Interpolation
Lecture slides :
Fitting curves to data  (pdf)
Lecture slides :
Polynomial Interpolation  (pdf)
Codes written or demonstrated in class :
exp_fit.m

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 :
test_lagrange.m
Wednesday -- 
Lecture slides :
Piecewise Polynomial Interpolation  (pdf)
Codes written or demonstrated in class :
mkspline.m

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 :
golden_search.m
Wednesday --  Introduction to Quadrature Rules
Codes written or demonstrated in class :
int_demo.m

Week #15 (Apr. 27)
Monday --  Solving differential equations
Codes written or demonstrated in class :
euler_demo.m
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 :
hmwk0.pdf
Other resources :
hmwk0_solns.pdf  -- Use this as an example of how to format your homework
write_file.m
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 :
hmwk1.pdf
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 :
hmwk2.pdf
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 :
hmwk3.pdf
Other resources :
poly1.dat
poly2.dat
poly3.dat
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 :
hmwk4.pdf
Other resources :
H2Odensity.dat
baryxdata.dat
baryydata.dat
dq1.dat
dq2.dat

Homework #5

Due Apr. 15

Assignment :
hmwk5.pdf
Other resources :
rollercoaster.dat
snow.dat
plot_julia.m
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 :
hmwk6.pdf
Other resources :
plot_shapes.m
plot_msh.m
msh.region

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