Lab Exercises
Hands-on exercises are performed during the class meeting as a way to learn and consolidate knowledge. We refer to these as "lab exercises".
Here is a compact list of the labs
- Lab 1 - Using MATLAB, Making and Saving Plots
- Lab 2 - MATLAB Functions
- Lab 3 - fprintf, for, and if
- Lab 4 - if and while
- Lab 5 - Introduction to Root-finding
- Lab 6 - Root-finding with Nested functions and fzero
- Lab 7 - Review of Linear Algebra
- Lab 8 - Solving Linear Systems
- Lab 9 - Solving First Order ODEs
And here is a short summary of each lab. Click on the lab heading or the "Continue ..." link to get the full content for the lab exercise.
Lab 9 - Solving First Order ODEs
In this lab we introduce odeEuler
, a simple code for solving first order
ODEs.
Download
- Lab 9 Worksheet
odeEuler.m
code to solve a user-specified, first order, ODEdemoEuler.m
demonstrates how to useodeEuler
demoEulerPlot.m
extendsdemoEuler
to plot the numerical and exact solutions
At the end of lab, submit a word-processing document with the results of your work. Also submit the m-files you created to answer the exercises in the lab handout.
Lab 8 - Solving Linear Systems
In this lab we practice linear algebra operations that are used to solve linear systems of equations.
Download
- Lab 8 Worksheet
pumpcurve.m
solutionpumpcurveComplete.m
solution
At the end of lab, submit a word-processing document with the results of your work. Also submit the m-files you created to answer the exercises in the lab handout.
Lab 7 - Review of Linear Algebra
In this lab we practice linear algebra operations and introduce the idea of a least squares curve fit
Download
The least squares animation is currently available as compiled p-code versions. You will have to download the appropriate version for your operating system. Also, use a right-click "Save as …" to download these files. Clicking on the link will download the pcode to your web browser, which won't be productive.
- Compiled pcode
randFitWin.p
for Windows - Compiled pcode
randFitMac.p
for Macintosh
At the end of lab, submit a word-processing document with the results of your work. Also submit the m-files you created to answer the exercises in the lab handout.
Lab 6 - Root-finding with Nested functions and fzero
In this lab we practice with nested functions and
introduce the built-in fzero
function to find roots of a function .
Download
And if you want an extra challenge (not required), you can
download newton.m
to solve part (c)
of problem 3 on the Lab worksheet.
At the end of lab, submit a word-processing document with the results of your work. Also submit the m-files you created to answer the exercises in the lab handout.
Lab 5 - Introduction to Root-finding
In this lab we practice with nested functions and
use brackPlot
and bisect
to find roots of a function .
Download
At the end of lab, submit a word-processing document with the results of your work. Also submit the m-files you created to answer the exercises in the lab handout.
Lab 4 - if and while
This lab focuses on if
statements and while
loops.
Download
At the end of lab, submit a word-processing document with the results of your work. Also submit the m-files you created to answer these problems.
Lab 3 - fprintf, for, and if
This lab focuses on for
loops. In order to make those loops
interesting, we are also using the fprintf
statment to display
formatted output. There are occasional uses of \texttt{if}
statments, but we will study \texttt{if} in detail next week.
Download
At the end of lab, submit a word-processing document with the results of your work. Also submit the m-files you created to answer these problems.
Lab 2 - MATLAB Functions
This lab focuses on writing and using MATLAB functions.
Download
At the end of lab, submit a word-processing document with the results of your work. Also submit the m-files you created to answer these problems.
Lab 1 - Using MATLAB, Making and Saving Plots
This lab introduces (or re-introduces) the MATLAB environment. We focus on making plots and developing a 'computational thinking' approach to the development and testing of MATLAB functions.
Download
At the end of lab, submit a word-processing document with the results of your work. Also submit the m-files you created to answer these problems.
Document updated 2017-01-04.