University of Alaska Fairbanks
Geophysical Institute

Beyond the Mouse - The geoscientist's computational chest.

5. Matlab II: Live Programming

"Programming is legitimate and necessary academic endeavor."
Donald E. Knuth

This lecture is mostly unprepared which is key. We'll (the whole class) try to implement the seminar flow chart (see below) in Matlab. The main idea is to show you how programming works by watching and participating for an hour. There's gonna be no magic, and -hopefully- no cursing involved.

Lecture

class flow chart (pdf)

Examples

This lecture IS the example. Here is what we did: tar.gz or zip archive. The files maked '*OLD' are (with minor changes) what we did in class. I added two more functions for sending actual email and attending the class. I also changed a couple things in the main script (btm_schedule.m).

(tentative) Exercises:

5.0

Make yourself familiar with the changes I incorporated in the OLD and new version of the program files (download above!). Run the examples and see what happens (have your email address and SMTP server address handy). YES, the emails are being sent when you're connected to the Internet :)

5.1

Add comments to the new version of the btm_schedule program and the functions it calls (I did this for send_email.m, don't worry about that.)

5.2

Add the first part of the flow chart where the user is asked whether they need to program to the script btm_schedule.m. Do it whichever way you like, but make sure it will ask the user the same question until they answer 'y'.

ronni <at> gi <dot> alaska <dot> edu | last changed: Oct 01, 2009