CS1371 Teaching Outlines

Summary

Homework 1 due week 1:  Getting Started

Homework 2 due week 2:  Basic Vectors

Homework 3 due week 3:  Conditionals, Iteration and Vector Operations

Homework 4 due week 4: Functions and Cell Arrays

Week 5: Test 1

Homework 5 due week 6:  Structures, Arrays

Homework 6 due week 7:  File I/O and recursion

Homework 7 due week 8:  Plotting

Homework 8 due week 9: Advanced Plotting

Week 10: Test 2

Week 11: Spring Break

Homework 9 due week 12: Matrices, Images

Homework 10 due week 13:  Numerical Methods

Homework 11 due week 14:  Advanced Numerical Methods, Sorting

Week 15: Test 3

Philosophy

Philosophical Notes: 

  1. with a text book containing all the students should know, we are free to explain the difficult parts of a chapter, but expect the students to dig around for the rest of it.
  2. Having said that, many of the chapters push just a bit further than the students really need to go, thereby challenging the top flight students.  We might have to make clear which parts are "beyond the pale."

Lecture 1

Objective:  Introduce Matlab (Ch 1 & 2)

Introductions

Course Overview

Concept:  variables and assignment

Lecture 2

Objective:  Scripts (Ch 3)

Intro Materials

Problem Solving

Matlab Introduction

Writing a Script

Lecture 3

Objective: How to do and turn in homework

Introduction to T-Square

Homework Mechanics

Walk through the following steps for doing Homework 1.

Introduce Vectors

Lecture 4

Objective:  Vector Operations (Ch 4)

Arithmetic expression

Logical expression

Vector Indexing with integer Vectors

Vector Indexing with logical Vectors

Applying built-in Functions

Lecture 5

Objective:  Conditionals (Ch 5)

Logical expression

If statements

 

Switch statements

Lecture 6

Objective:  Iteration (Ch 6)

For loops

While loops

Lecture 7

Objective:  Functions (Ch 7)

Simple Function

Code Re-use

More Stuff

Lecture 8

Objective: Character Strings (Ch 6)

Manipulating Strings

Lecture 9

Objectives:  Cell Arrays (Ch 7)

Containers

Lecture 10

Objective: Structures (Ch 7)

CDs Material

Structure for 1 CD

Lecture 11

Objectives:  Using structure arrays as examples of problem solving operations (Ch 10)

Structure Arrays

Problem Solving

Identify each of the following and code examples from the CD collection

Lecture 12

Objectives:  Continue problem solving operations (Ch 10)

TEST 1

Lecture 13

Speech about not giving up:

q  changing study habits,

q  final grade replacing test average

Objective: Arrays (Ch 3)

Extending vectors to arrays

Lecture 14

Objectives: File I/O with Spread Sheets (Ch 8)

File I/O Materials

Types of File I/O:

Examples:

 Lecture 15

Objective: Mid-Level File I/O (Ch 8)

q  CSV Files

Objective: Low-Level File I/O (Ch 8)

q  Open, close

q  Get strings

Lecture 16

Objective: Finish up File I/O (Ch 8)

q  Tokens

Lecture 17

Objective: Understanding Recursion (Ch 9)

Recursion Materials

q  Stacks

q  Activation Stack implementation of Function Calls

q  Illustrate on the Board using Roots of a Quadratic

q  Canonical problem:  factorial

o    Define the factorial

o    Identify 3 parts of recursion:

o    Write the code

o    Run with the Debugger for simple case

q  Wrapper functions for setup -- negative or fractional numbers?

q  Local functions

q  Graphical Root Finding

q  Palindromes

q  Fibonacci

q  Mutual recursion

q  Tail recursion (?)

Lecture 18

Objective: Complete discussion of recursion (Ch 9)

Overall, we need to have covered these topics:

q  Basic recursion -- factorial -- how it works, and why --activation stack etc.

q  Wrapper functions -- preparing the data and checking for errors

q  Tree recursion --Fibonacci --a bad idea computationally

q  Perhaps Palindromes or other examples

q  Not tail recursion or mutual recursion

Lecture 19

Objective: Begin discussion of plotting (Ch 11)

Plotting Materials

q  There is an intercepts script to start the discussion if you want

q  2-D plotting -- line color, symbols, titles, etc. [rotate to see the 3-D effect]

q  Parametric curves -- circle, random walk

q  plot3(...)

 

Lecture 20

Objective: Continue discussion of plotting (Ch 11)

q  meshgrid, surf, mesh

q  shading, lighting

Lecture 21

Objective: Bodies of Rotation (Ch 11)

q  Rotate about X-axis

q  Rotate discrete data points

Lecture 22

Objective: Finish up Bodies of Rotation (Ch 11)

q  Rotate about the vertical axis

q  Using the 4th parameter to surf

q  ...

Objectives: File I/O with CSV files (Ch 8)

Atlanta Data

Lecture 23

Objective: Matrix Multiplication (Ch 12)

Matrix Materials

q  Matrix multiply

q  Coordinate rotation

q  Twinkling stars

Lecture 24

Objective: Matrix Division (Ch 12)

q  Basics of division

q  Solving Simultaneous equations

q  Resistor network

q  Chemical Composition

Lecture 25

Objectives: Introduce Images (Ch 13)

Image Materials

Introduce Image formats

Simple image analysis and processing

Lecture 26

Objective: Second Images lecture (Ch 13)

Use the image Volta.jpg

 

TEST 2

Lecture 27

Objective: Third Images Lecture (Ch 13)

Lecture 28

Objective: Begin Numerical Methods – Ch 15

Numerical Methods Materials

Lecture 29

Objective: Continue Numerical Methods (Ch 15)

Lecture 30

Objective: Continue Numerical Methods (Ch 15)

Lecture 31

Objective: Problem Solving

Lecture 32

Objective:  Understand Measures of Computing (Ch 16)

*        Big O as a measure of the work done by an algorithm

Objective:  Understand MATLAB sorting (Ch 16)

*        Using MATLAB internal sort of a vector

*        Extracting fields from a structure array -- numerical and sorting the array

*        Extracting fields from a structure array -- strings and sorting the array

o   I really minimize this discussion by using as an analogy the area of the space occupied by the steps in the sort algorithms.  All are N wide;  Insertion Sort is also N deep, where the other two are Log N deep.

Objective:  Understand sorting algorithms (Ch 16)

Sort Demo & Sorting Code

*        Four sorting techniques:

o   Bubble Sort

o   Insertion Sort

o   Merge Sort

o   Quick Sort

*        Circumstances under which last three might be used.

*        Students should be able to code first three using a vector of numbers

Lecture 33

Objective: Sorting (Ch 16)

-          Complete sorting discussion

Lecture 34

Objectives:  Introduce Sound (Ch 14)

Sound Materials

*        Reading and Playing Sound

*        Changing amplitude and playback frequency

*        Slicing and concatenating speech.

 

Lecture 35

Objective:  More on Sound (Ch 14)

*        Instrument sounds:

o   The musical scale -- 21/12 factor between half steps

o   Octave doubles the frequency

*        Playing a tune by changing Fs

o   Note duration achieved by pausing

*        Assembling a tune by stretching / shrinking the note

o   Note duration achieved by the number of samples concatenated

Lecture 36

Objective: Finish up Sound (Ch 14)

Lecture 37

Objective:  Queues (Ch 17)

Graph Materials

*        Queue

*        Priority Queue

TEST 3

Lecture 38

Objective:  Finish Queues (Ch 17)

Lecture 39

Objective:  Processing Graphs (Ch 17)

*        Definition of a Graph

*        Breadth-First Search

*        Dijkstra's Algorithm for Optimal Search

Lecture 40

Objective: Lecturer’s Choice

Lecture 41

Objective: Course Overview