Coding Workshop

Exercises: The excercises are matlab files, which can be opened in matlab if you like, or you can edit them as text files. Most of the time, you should be able to run the file in matlab and not get any errors. I'll probably post the answers at the same time or a day or two afterward. There's no sense in making people wait too long, I think. The answers can be as instructive as the questions, but please try to do the questions first (otherwise it will be difficult to learn!).

Topic Description Slides Excercises
Vocabulary We need to be on the same page regarding the words used when we program. This topic is meant to introduce the concepts needed in order to talk about programs, and provide a good foundation for learning the more exciting stuff. Code Concepts
Matlab Syntax; Matlab Data Structures We will review matlab syntax, as well as introduce matlab data structures. As. 1
Functions Finally something useful. We'll see the structure of functions, and why they are useful. Functions I
Flow Control Flow control gives us the power to tell our programs how to decide what to do. Flow Control As. 2
Functions 2 With flow control, we can see how to really use functions to our advantage. At this point, we will be able to make real programs. Lab 1
Input/Output Now you can write programs to calculate just about anything, but it's better if you can tell someone about your answer!
Optimization We see that using vectors as opposed to loops speeds things up tremendously. Lab 2 will give you some practice with this. Lab 2
circle data
More Practice The rest of the assignments are just for practice. Lab 3
3 time series
Core Issues TMTOWTDI, but always remember TANSTAAFL. We'll see what these mean, and look back to see how they have played into our assignments.
Debugging MATLAB has a rather nice debugger included. We'll spend some time working with it, and learning techniques for effective debugging.

Advanced Topics

Topic Description Slides Excercises
Dynamic programming Dynamic programming refers to a specific class of algorithms. One of their features is that they operate by filling in a matrix in a very specific way to find a solution to some problem. Because of its native matrix type, MATLAB is well suited to these types of algorithms. editdistance.m
Functional programming Functional programming is an approach, usually opposed to "imperative" programming, which makes the function a primary element. Functional programs are not a list of steps to take, but mathematical expressions which are evaluated (by means of function composition). functional.m
Artificial Graduation
Note: There is at least one syntax error in the above code! Still funny though.