CS 1112: Introduction to Computing using MATLAB

Lecture materials

Audio recordings of lectures, along with compressed versions of some course materials, are available on our low bandwidth page for students without reliable access to high-speed Internet (NetID login required). Lecture videos can be streamed from Canvas (note that the Panopto viewer lets you separate the speaker video from the desktop video).
No. Date Topics Lecture Slides Program Examples Reading (Insight)
1 1/21 Tu Introduction Slides Preface & Software sections
2 1/23 Th Programming basics Slides sphereArea.m, diffArea.m 1.1, Exercise 1
3 1/28 Tu Conditionals Slides 1.2
4 1/30 Th Nested conditionals; logical operators Slides quadMin.m, quadMinGraph.m, Eg1_2.m from Insight 1.2
5 2/4 Tu Iteration: for Slides stickExp.m, showForLoop.m, ave10.m, mcPi.m 2.1
MatTV: Troubleshooting Loops
2/4 Tu Project 1 due
6 2/6 Th Iteration: while Slides areaCircle.m 2.2, 3.2
7 2/11 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 2/13 Th User-defined functions Slides piFrac.m, nestedLoops.m, polar2xyScript.m, polar2xy.m 5.1, 5.2
9 2/18 Tu Executing a user-defined function Slides randDouble.m, polar2xy.m, drawColorDot.m, dotsInRingsScript.m 5.3
MatTV: Executing a Function
2/17 M Project 2 due
10 2/20 Th Vectors, simulation Slides plotComparison2.m 6.1
2/25 Tu February Break
11 2/27 Th Probability and averages, vectors Loop patterns for vectors [video]
Slides
Centralize.m, testCentralize.m, rollDie.m, rollDieV1.m, RandomWalk2D.m, ShowRW.m 6.2, 6.3
12 3/3 Tu Discrete vs. continuous; linear interpolation Slides xenoDisks.m, threeFadingDisks.m, fadingXenoDisks.m, rowsOfXenoDisks.m 4.1–4.3
3/4 W Project 3 due
13 3/5 Th Vectorized computation, 2-d Arrays—matrix Slides plotComparison.m, minInMatrix.m 7.1
14 3/10 Tu Matrix examples Slides Cheapest.m, ShowCheapest.m, RandomLinks.m 7.2, 7.3
3/10 Tu Prelim 1 7:30 – 9:00pm
15 3/12 Th Working with Images
(Vectorized code on multi-dimensional array)
Slides RandomLinks.m, ShowRandomLinks.m, pictureFrame.m, pictureFrame2.m, pictureFrameV.m 12.1, 12.2
3/28-4/5 Spring Break
16 4/7 Tu Working with Images (arithmetic in type uint8) Slides LawSchool.jpg, showMirror.m, showToGrayscale.m, LawSchoolNoise.jpg MedianFilter.m, showFilter.m 12.4
17 4/9 Th Character arrays, linear search Slides aminoAcidCounts.m, getMnemonic.m, getAAIndex.m 9.1
4/13 M Project 4 due
18 4/14 Tu Cell array Slides linearSearch, analyzeLinearSearch.m
CardDeck.m, Deal.m, Shuffle.m
8.1, 11.1, 11.2
Cell/Struct Syntax Summary
19 4/16 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/21 Tu Objects and Classes Slides Interval.m, demoInterval0.m
Optional: demoPlotObj.m
Why object-oriented design?
Role of classes
4/21 Tu Test 2A
21 4/23 Th Class definition—properties & methods Slides Interval.m, demoInterval1.m, demoInterval2.m
22 4/28 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/30 Th Why OOP? Private vs. public, Inheritance Slides
Die & TrickDie pdf
Die.m, TrickDie.m, demoDice.m OOP syntax summary
4/30 Th Project 5 due
24 5/5 Tu Recursion Slides removeChar_loop.m, removeChar.m, removeChar2.m MeshTriangle.m, showMeshTriangle.m 14.1
5/5 Tu Test 2B
25 5/7 Th Sort and search Slides insertionSortSimple.m, InsertionSort.m, ShowInsertionSort.m, InsertionSortIntervals.m, demoSortIntervals.m, see Interval.m and intervalArray.m from previous lectures. binarySearch.m, showBinarySearch.m, recursiveBinarySearch.m 8.2, 9.2, 9.3
26 5/12 Tu Divide and Conquer Slides merge.m, mergeSort.m, showMergeSort.m, insertSortInplace.m, comopareInsertMerge.m 14.2, 14.3
5/12 Tu Project 6 due
5/18 M Final Exam