Lecture materials
No. | Date | Topics | Lecture Slides | Program Examples | Reading (Insight) |
---|---|---|---|---|---|
1 | 2/9 Tu | Introduction | Slides | Preface & Software sections | |
2 | 2/11 Th | Programming basics |
Handout Slides |
sphereArea.m, diffArea.m | 1.1, Exercise 1 |
3 | 2/16 Tu | Conditionals | Slides | 1.2 | |
4 | 2/18 Th | Nested conditionals; logical operators | Slides | quadMin.m, quadMinGraph.m, Eg1_2.m from Insight | 1.2 |
5 | 2/23 Tu | Iteration: for | Slides | stickExp.m, showForLoop.m, ave10.m, mcPi.m |
2.1, MatTV: Troubleshooting Loops |
2/23 Tu | Project 1 due | ||||
6 | 2/25 Th | Iteration: while | Slides | areaCircle.m |
2.2 (or MatTV: The while-Loop), 3.2 |
7 | 3/2 Tu | Developing algorithms; nested loops | Slides |
drawDemo.m,
nestedStars.m
moreNestedStars.m,
mTable.m User-defined functions: DrawRect.m and DrawStar.m from Insight; DrawDisk.m |
3.1 |
8 | 3/4 Th | User-defined functions | Slides | piFrac.m, nestedLoops.m, polar2xyScript.m, polar2xy.m | 5.1, 5.2 |
3/8 M | Project 2 due | ||||
3/9–3/10 | Wellness days | ||||
9 | 3/11 Th | Executing a user-defined function | Slides | dotsInRingsScript.m, randDouble.m, polar2xy.m |
5.3 MatTV: Executing a Function |
10 | 3/16 Tu | Vectors, simulation | Slides | plotComparison2.m, Centralize.m, testCentralize.m | 6.1 |
11 | 3/18 Th | Probability and averages, vectors | Slides | rollDieV1.m, rollDie.m, rollDice.m, RandomWalk2D.m, ShowRW.m | 6.2, 6.3 |
12 | 3/23 Tu | Discrete vs. continuous; linear interpolation | Slides | xenoDisks.m, threeFadingDisks.m, fadingXenoDisks.m, rowsOfXenoDisks.m | 4.1–4.3 |
3/24 W | Project 3 due | ||||
13 | 3/25 Th | Vectorized computation, 2-d Arrays—matrix | Slides | plotComparison3.m, minInMatrix.m | 7.1 |
14 | 3/30 Tu | Matrix examples | Slides | Cheapest.m, ShowCheapest.m, RandomLinks.m | 7.2, 7.3 |
3/30 Tu | Prelim 1 (6:30pm) Barton Hall 100 (sec A, C, E) | ||||
15 | 4/1 Th | Working with Images (Vectorized code on multi-dimensional array) |
Slides | ShowRandomLinks.m, ShowRandomLinks2.m, pictureFrame.m, pictureFrame2.m, pictureFrameV.m | 12.1, 12.2 |
16 | 4/6 Tu | Working with Images (arithmetic in type uint8 ) |
Slides | LawSchool.jpg, showMirror.m, showToGrayscale.m, LawSchoolNoise-800.jpg MedianFilter.m, showFilter.m | 12.4 |
17 | 4/8 Th | Character arrays, linear search | Slides | aminoAcidCounts.m, getMnemonic.m, getAAIndex.m | 9.1 |
4/8 Th | Project 4A due | ||||
18 | 4/13 Tu | Cell array | Slides |
linearSearch,
analyzeLinearSearch.m CardDeck.m, Deal.m, Shuffle.m, ShowCards.m |
8.1, 11.1, 11.2 Cell Syntax Summary |
4/14 W | Project 4B due | ||||
19 | 4/15 Th | File I/O, sort() |
Slides |
file2cellArray.m,
cellArray2file.m,
population.m,
statePop.txt issYear.m, norad.txt |
9.2, 11.1, 11.2 |
20 | 4/20 Tu | Objects and Classes | Slides |
Interval.m,
demoInterval0.m
Optional: demoPlotObj.m |
Why object-oriented design? Role of classes |
21 | 4/22 Th | Class definition—properties & methods | Slides | Interval.m, demoInterval1.m, demoInterval2.m | |
4/22 Th | Prelim 2 (6:30pm) Barton Hall 100 (sec A, C, E) | ||||
4/23–4/26 | Wellness days | ||||
22 | 4/27 Tu | Array of objects, overloading, constructor that handles variable number of args | Slides | Interval.m, intervalArray.m, widestInterval.m, LocalWeather.m, ithacaWeather.txt | |
23 | 4/29 Th | Why OOP? Private vs. public, Inheritance |
Slides
Die & TrickDie pdf |
Square.m, SquareClient.m, Die.m, TrickDie.m | OOP syntax summary |
4/29 Th | Project 5 due | ||||
24 | 5/4 Tu | Extending a class | Slides | demoDice.m |
Read class Die , constructor of TrickDie
|
25 | 5/6 Tu | Recursion | Slides | removeChar_loop.m, removeChar.m, removeChar2.m MeshTriangle.m, showMeshTriangle.m | 14.1 |
26 | 5/11 Tu | Sort and search | Slides | insertionSortSimple.m, InsertionSort.m, ShowInsertionSort.m, InsertionSortIntervals.m, demoSortIntervals.m, see Interval.m and intervalArray.m from previous lectures. | 8.2, 9.2, 9.3 |
27 | 5/13 Th | Divide and Conquer | Slides | binarySearch.m, showBinarySearch.m, merge.m, mergeSort.m, showMergeSort.m, insertSortInplace.m, comopareInsertMerge.m | 14.2, 14.3 Merge demo |
5/13 Th | Project 6 due | ||||
5/24 M | Final Exam (9:30am) Barton Hall 100 (sec C, D) |