# Lecture materials

These posted files are not complete transcripts of the lectures. You are expected to attend lecture and to take notes for yourself. The section numbers for reading refer to our textbook Programming with MATLAB. Videos are from the textbook for CS 1112 (our full-semester MATLAB course), Insight Through Computing.

No. Date Topics Notes Program examples Reading / videos
1 Fri, Aug 27 Introduction, MATLAB interface, simple script Outline
Slides
SphereArea.m, diffArea.m 1.1, 1.3, Ch 2, 3.1–3.5
The Matlab Desktop
2 Mon, Aug 30 User-defined functions, conditionals, `for`-loop Outline
Slides
mcPi.m 3.8, Ch 4, Ch 5
User-Defined Function, Conditional Statement, The `for`-loop, Troubleshooting Loops
Wed, Sep 1 Lab 1: MATLAB basics, user-defined functions
3 Fri, Sep 3 `while`-loop, arrays, simple graphics Outline
Slides
piApproxPlot.m, piApproxAnnulus.m, piApproxWhile.m 6.1
The `while`-Loop, Creating Arrays, Array Addressing
Mon, Sep 6 Labor Day
Wed, Sep 8 Lab 2: Loops, 1-d arrays (vectors)
4 Fri, Sep 10 Vector applications, 2-d array (matrix) Outline
Slides
cumulativeSum.m, rollDie.m, showMultigraph.m, plotComparison2.m, printMatrix.m 6.2–6.11, Ch 7, 8.1–8.3, 9.1–9.3, 9.11
5 Mon, Sep 13 Matrices, nested loops Outline
Slides
Mon, Sep 13 Assignment 1 due
Wed, Sep 15 Lab 3: 2-d array (matrix), nested loops
6 Fri, Sep 16 Vectorized arithmetic, subfunction Outline
Slides
piApproxSub.m, plotComparison.m, minInNeighborhood.m Vectorized Arithmetic
7 Mon, Sep 20 Vectorized logical operations Outline
Slides
minInNeighborhoodV2.m, minInNeighborhoodV3.m, mcPi_plot_v1.m, mcPi_plot_v2.m, mcPi_plot_v3.m, mcPi_plot_v4.m Ch 12
Wed, Sep 22 Lab 4: Subarrays, non-uniform distributions
8 Fri, Sep 24 `char` and `char` arrays Outline
Slides
removeChar_loop.m, toUpper.m, censor.m, showCensor.m 10.1-10.5
Characters & Strings
9 Mon, Sep 27 Review Slides
Mon, Sept 27 Assignment 2 due
Wed, Sep 29 Test (Location: Thurston 205)
10 Fri, Oct 1 Cell arrays, file I/O Outline
Slides
roman.m Ch 11
Strings in Cell Arrays
11 Mon, Oct 4 Selection and filtering Outline
Slides
file2cellArray.m, cellArray2file.m, issYear.m, norad.txt, makePuzzle.m, guessLetter.m Vectorized Logical Operations
Wed, Oct 6 Lab 5: Char arrays, vectorized logical ops, cell arrays
12 Fri, Oct 8 Application: image processing Slides probePixel.m, DrawCrosshairs.m, peppers-g.png Ch 16 (optional)
Mon, Oct 11 Fall break
Wed, Oct 13 Lab 6: Work on assignment 3
13 Fri, Oct 15 Image processing (continued) Slides toBWLuma.m, medianFilter.m, LawSchoolNoise-800.jpg
14 Mon, Oct 18 Function handles Slides accof.m, RootDemo.m, lvrhs.m, LVDemo.m Ch 13 (optional)
Mon, Oct 18 Assignment 3 due