SUNY Geneseo Department of Computer Science


CSci 120 — R/Procedural Programming: Matlab

Spring 2014

Last updated March 3, 2014

Time and Place: MWF 11:30 - 12:20, F 10:30 - 11:20; South 341

Final Meeting: Friday, May 9, 12:00 noon; Newton 201

Instructor: Doug Baldwin
Office: South 307
Phone: 245-5659
E-Mail: baldwin@geneseo.edu
Twitter: @DougBaldwin5
Office Hours: M 10:00 - 11:00, R 1:30 - 2:30, or By Appointment

TAs:
Samir Farooq (saf8@geneseo.edu)
Nick LaVigne (nsl3@geneseo.edu)
Office hours TBA

WWW Pages:
Lecture Notes: http://cs.geneseo.edu/~baldwin/csci120/spring2014/lectures.html
Exercises: http://cs.geneseo.edu/~baldwin/csci120/spring2014/exercises.html

A computer program is a set of instructions to a computer. One writes programs in special programming languages, which have rigid grammatical rules and limited vocabularies. Underlying every program, however, is an “algorithm,” a general idea of how to accomplish some task, not restricted to any particular language, and not necessarily even computer-oriented. Algorithms are the central topic of computer science; programs provide a uniquely rigorous and conveniently executable way of describing algorithms. This course therefore has two goals: to teach you to write programs within the conventions of a particular language (Matlab), and in doing so to develop your ability to devise and reason about algorithms.

There are many reasons to use algorithms and write programs. Programmers in the software industry do it to develop web services, computer games, mobile apps, etc. But amid all the blockbuster commercial programs, it’s important not to forget that algorithms and programming also have a lot of value on a more personal scale: as a way to solve some calculational problem for yourself or a small group, as a way to analyze a particular set of data, or even as a way to gain individual insight into an idea by simulating and visualizing it. This course seeks to introduce you to computing in this second, personal, context. It therefore teaches a style of programming (“procedural” programming) and a language that are very good for quickly trying out algorithmic ideas and turning them into relatively small programs, although less suited to developing large programs that will have a long life in the hands of many programmers.

This course will mainly use mathematical problems as contexts for programming, although some of these problems will be mathematical models of physical phenomena. However, the algorithmic thought processes and programming skills that you develop in this course transfer easily to other areas.

Learning Outcomes

Upon completing this course, students who meet expectations will be able to do the following:

Books and Other Resources

I will teach this course in what is called a “flipped” format, meaning that the one-professor-to-many-students broadcasting of information that consumes almost all of the classroom time in a traditional lecture course will be moved into readings and on-line “lectures” (typically demonstrations or narrated slide shows running for 5 to 10 minutes, not videos of a traditional lecture) that you will do outside of class, while classroom time will be used almost entirely for more individualized question-answering and mentored problem solving. The resources listed below are important parts of this teaching strategy.

Textbook

The textbook for this course is

Attaway, Matlab: A Practical Introduction to Programming and Problem Solving (3rd ed.)

It is available from the college bookstore and other sources.

Online Lectures

Most of the online “lectures” come from just a few sources:

Other Online Resources

MathWorks, the company that makes Matlab, has an extensive web site, including Matlab documentation, at http://www.mathworks.com/

Software

You will need to install a copy of Matlab on your own laptop. You can get copies for either Macintosh or PC computers from Geneseo, at

http://software.geneseo.edu

(Scroll down through the list of software until you find Matlab)

Instructions for installing Geneseo’s Matlab on your own computer are at

https://wiki.geneseo.edu/display/cit/MatLab+R2013a+Installation+Guide

The copy of Matlab you get from Geneseo will only run on a computer connected to the Geneseo network. If you commonly work off campus, you can use a “virtual private network” (VPN) to make it look like your computer is on Geneseo’s network. The VPN is simply a piece of software you install on your computer. Windows users can download the “Cisco VPN” package from software.geneseo.edu. Macintoshes come with a VPN pre-installed; follow the instructions at https://wiki.geneseo.edu/display/cit/Setting+up+Geneseo+VPN+on+Mac+OS+X+10.6+Snow+Leopard+to+10.8+Mountain+Lion to activate it.

Course Schedule

The following dates are best estimates. They may well change as students’ actual needs become apparent. Refer to the Web version of this syllabus for the most current information, I will keep it as up-to-date as possible:

Jan. 22 - Jan. 29 Introduction to Matlab
Jan. 31 - Feb. 5 Arithmetic
Feb. 7 - Feb. 12 Vectors
Feb. 12 - Feb. 14 Writing Matlab Programs
Feb. 17 - Feb. 21 Plotting
Feb. 24 - Feb. 26 Matrices
Feb. 28 Hour Exam 1
Mar. 3 - Mar. 5 User-Defined Functions
Mar. 7 - Mar. 14 Definite Iteration
Mar. 24 - Mar. 28 Conditional Statements
Mar. 31 - Apr. 4 Indefinite Iteration
Apr. 7 - Apr. 9 Matlab Debugging Tools
Apr. 11 Hour Exam 2
Apr. 14 - Apr. 25 Non-Numeric Data
Apr. 28 - May 5 Files
May 9 Final Exam

Grades and Such

Your grade for this course will be calculated from your grades on exercises, exams, etc. as follows:

Programming Projects (3 - 5) 15%
Quizzes (unannounced but frequent) 5%
Hour Exams (2) 20% each
Final 30%
Participation 10%

In determining numeric grades for individual assignments, questions, etc., I start with the idea that meeting my expectations for a solution is worth 80% of the grade. I award the other 20% for exceeding my expectations in various ways (e.g., having an unusually elegant or insightful solution, or expressing it particularly clearly, or doing unrequested out-of-class research to develop it, etc.); I usually award 10 percentage points for almost anything that somehow exceeds expectations, and the last 10 for having a solution that is truly perfect. I deliberately make the last 10 percentage points extremely hard to get, on the grounds that in any course there will be some students who routinely earn 90% on everything, and I want even them to have something to strive for. I grade work that falls below my expectations as either meeting about half of them, three quarters, one quarter, or none, and assign numeric grades accordingly: 60% for work that meets three quarters of my expectations, 40% for work that meets half of my expectations, etc. This relatively coarse grading scheme is fairer, more consistent, and easier to implement than one that tries to make finer distinctions.

This grading scheme produces numeric grades noticeably lower than traditional grading does. I take this into account when I convert numeric grades to letter grades. The general guideline I use for letter grades is that meeting my expectations throughout a course earns a B or B+. Noticeably exceeding my expectations earns some sort of A (i.e., A- or A), meeting most but clearly not all some sort of C, trying but failing to meet most expectations some sort of D, and apparently not even trying earns an E. I set the exact numeric cut-offs for letter grades at the end of the course, when I have an overall sense of how realistic my expectations were for a class as a whole. This syllabus thus cannot tell you exactly what percentage grade will count as an A, a B, etc. However, in my past courses the B+ to A- cutoff has typically fallen somewhere in the mid to upper 80s, the C+ to B- cutoff somewhere around 60, and the D to C- cutoff in the mid-40s to mid-50s. I will be delighted to talk with you at any time during the semester about your individual grades and give you my estimate of how they will eventually translate into a letter grade.

Late Policy

I will accept work that is turned in late, but with a 10% per day compound late penalty. For example, homework turned in 1 day late gets 10% taken off its grade; homework turned in 2 days late gets 10% taken off for the first day, then 10% of what’s left gets taken off for the second day. Similarly for 3 days, 4 days, and so forth. I round grades to the nearest whole number, so it is possible for something to be so late that its grade rounds to 0.

I may grant extensions, if (1) they are due to circumstances truly beyond your control, and (2) you ask for the extension as early as possible. At my discretion, I may require proof of the “circumstances beyond your control” before granting an extension.

Policy on Collaboration

Assignments in this course are learning exercises, not tests of what you know. You are therefore welcome to work on them in small groups—a well-managed group makes a successful, and thus more educational, project more likely. In fact, I will explicitly ask you to form three-person study groups in which to work on recitation exercises.

I will require that everyone turn in solutions to the out-of-class programming projects written in their own words. The ideas in these solutions may be developed by a group, but at least the expression of those ideas must be yours. Furthermore, any ideas you use that aren’t yours should be acknowledged with a comment or other parenthetical remark identifying the person or source from which you got them.

Please note that tests and quizzes are tests of what you know, and working together on them is explicitly forbidden. This means that if you take advantage of the collaboration policy to avoid doing your share of the work on the exercises, you will probably discover too late that you haven’t learned enough to do very well on the tests.

I will penalize violations of this policy. The severity of the penalty will depend on the severity of the violation.

Accommodations

SUNY Geneseo will make reasonable accommodations for persons with documented physical, emotional or learning disabilities. Students should consult with the Director in the Office of Disability Services (Tabitha Buggie-Hunt, 105D Erwin, 245-5112) and their individual faculty regarding any needed accommodations as early as possible in the semester.