W1005: Introduction to Computer Science and Programming in MATLAB
Fall 2014
General Information |
Introduction |
Lectures |
Homework |
Midterm Exam |
Final Project |
Grading
General Information
- Instructor: Ilia Vovsha (iv2121 at columbia dot edu)
- Office Hours: Fri 11:30am-1:30pm (850 Interchruch Center)
- Lecture: Mon & Wed 10:10-11:25am
- Classroom: 633 Mudd
- TAs: Jason Kang (jk3556 at columbia dot edu)
    Alexandra Pan (aqp2000 at columbia dot edu)
    Stephanie Yang (sjy2115 at columbia dot edu)
- TA Office Hours (TA Room, Mudd 122):
Mon.   1:00pm-3:00pm   (Jason)
Wed.   12:00pm-1:00pm   (Stephanie)
Wed.   4:00pm-5:00pm   (Stephanie)
Thu.   10:00am-12:00   (Alex)
Introduction
Course Description:
MATLAB is a high-level language and interactive environment that allows one to solve
science/engineering problems quickly using built-in functionality.
MATLAB is typically used to perform the following tasks:
- Various mathematical operations, e.g. matrix and vector multiplication.
- Data manipulation and analysis.
- Plotting and visualization.
- Complex mathematical functionality, e.g. optimization.
- Implementing prototypes of algorithms and models.
We introduce various computer science topics, as well as the basic matlab language features and functionality, and demonstrate how various tasks can be performed efficiently.
We assume no programming experience but some mathematical background is useful.
Specifically, linear algebra (first chapter in any textbook) and elementary
statistics.
Recommended Text:
Duane Hanselman and Bruce Littlefield, Mastering MATLAB 7, Prentice Hall. ISBN: 0131430181.
The book is available in the library, and the MATLAB documention is quite satisfactory on its own.
But it is a reasonable reference, if you need one.
A more comprehensive (& costly) reference is Mastering MATLAB by the same authors.
Useful Links:
Requirements:
- Access to MATLAB (version 7 or higher).
The Cunix machine (cunix.cc.columbia.edu) has MATLAB installed.
To access the machine type 'ssh your_uni@cunix.cc.columbia.edu'
at your terminal/shell/telnet and enter your UNI password.
Alternatively, there are
computer labs on campus where you can use your
CS account to access MATLAB, or you can get a student copy
at no cost under the Engineering School's site licence
here.
- Access to
courseworks for homework and grades.
- No textbook is required, but you are encouraged to consult the references
mentioned above.
- Basic understanding of linear algebra and elementary statistics
is useful, but not required. No programming experience is required.
Lectures
This is a rough list of topics that will be covered in this class:
- Intro to Computer Science
- Intro to MATLAB: workspace
- Variables & Operators
- Data types
- Arrays (vectors, matrices)
- Logical operators and Control Flow
- Scripts and simple functions
- Random numbers and Linear Algebra
- Cell arrays, character strings
- Data structures
- File input/output
- Basic visualization tools, plotting
- Intro to Complexity
- Algorithms (recursion, sorting)
- Optimization toolbox
- Classes and Object Oriented Programming
Lecture Notes:
- Week 1:  Admin,  
Background
- Week 2:  Basics
Readings: Chapters 1-5 (Topics: Desktop, Workspace, Basic Array/Matrix manipulation)
- Week 3:  Control Flow
Readings: Chapters 11, 12.1-12.2 (Topics: If-else statements, Loops, Functions)
- Week 4:  Functions
- Week 5:  Math
Readings: Chapters 17.1-17.2 (Topics: Random numbers, Linear equations, Least squares)
- Week 6:  Data Structures  
Readings: Chapters 7, 8, 9.1-9.5 (Topics: Cell arrays, Structures, Strings)
- Week 7:  Input/Output
Readings: Chapters 9.2, 14.1-14.3 (Topics: Loading/Saving data, Formats, Files)
- Week 8:  Midterm
- Week 9:  Plotting & Visualization
Readings: Chapters 26, 27.1-27.3 (Topics: 2D/3D plots, figures, plot properties)
- Week 11+12:  Algorithms
Readings: Chapters 12.(1,3,7,8) (Topics: Sorting & Search Algorithms, Big-O notation,
subfunctions, scope, function handles)
Readings: Chapters 13, 16.4 (Topics: Recursion analysis, profiling, time, Quicksort)
- Project Lecture:  Part 1,  
Part 2
GUI code,  
GUI figure,  
Another example
- Week 13:  Optimization
Readings: Optimization toolbox documentation
- Week 14:  Object Oriented Programming (OOP),
 
Readings: OOP documentation (Topics: classes, properties, methods, inheritance)
Homework
Instructions:
- Due Friday 4:00pm, up to 50% penalty if late. No exceptions.
- You may submit a late HW (with up to 50% penalty) until the following Monday, 10:00am.
- However, if you wish, you can do the extra HW and replace your lowest grade
with the grade you receive.
WARNING: extra HW is as difficult as the concurrent HW.
- Place your code and any additional files into a folder, and name it
'youruni_hw#' (e.g. iv2121_hw1).
Make sure that each file you submit
includes your name and UNI at the top.
- Upload the zipped folder to courseworks (assignments folder) before
the due date (4:00pm on Friday).
Problem Sets:
- HW1:   HW1 (Due: Sept. 19)
- HW2:   HW2 (Due: Oct. 3)
- HW3:   HW3 (Due: Oct. 17)
- HW4:   HW4 (Due: Nov. 7)
- HW5:   HW5,   isort.m,
  uefa.txt (Due: Nov. 21)
- HW6:   HW6, (Due: Dec. 5)
- EHW:   EHW (Due: Nov. 14)
Solutions: posted in "Files & Resources" section on courseworks
Midterm Exam
- Date:   October 22nd
- Format:   Exam format is posted in "Files & Resources" section on courseworks.
The exam covers the material up to and including the lecture on Oct. 15th, and HWs 1-3.
- List of Topics:
Hardware, software, memory, compiler,
workspace commands, variables, data types, vector/matrix manipulation (initialization,
elements, indices, built-in functions), matrix multipication, scripts,
comments, built-in array functions (sort,find,any,...), if-elseif-else statements,
for/while loops, switch, continue, break, (M-file) functions, input/output arguments,
passing by value/reference, errors, recursion,
random numbers, pseudo-random number generators, simple distributions (uniform, gaussian),
linear equations, least squares, data structures, cell-arrays, structs, strings,
varargin/out, sprintf, formats.
Final Project
- Description:   Project
- Due Dates:
  Write-up (Oct. 29, 11:59pm)
  Partial implementation (Nov. 25, 11:59pm)
  Final submission (full implementation, updated write-up) Dec. 12, 11:59pm
- Notes:
  - Your initial write-up should include a detailed outline of your project in the
proper format (see description). It does not have to be precise, and you have a chance
to update it in your final submission.
- The TAs will review your write-up and provide feedback.
- There will not be a penalty for revision as long as you submit on time.
- You can request to work with a particular TA by specifying their name at the top
of your write-up e.g., "Preferred TA:...". We will try to accomodate your preferences
but we don't guarantee that everyone will be satisfied.
- Partial implementation should include various parts of your code (scripts, functions).
It does not have to be complete, but you should demonstrate clear progress towards
solving your problem.
- Follow the same instructions to submit your partial implementation as your
final submission.
- Once your final implementation has been submitted and evaluated by the TAs, you will
be assigned a 10 minute slot to present your work. You should be prepared to answer questions
about every aspect of the code.
- Place your code and any additional files into a zip folder, and name it 'youruni_project' (e.g. iv2121_project.zip).
If there is any relevant (toy) data, include it. If you are generating images include them as well.
It is ok to include only a sample of data/images. You may also include a 'readme' file with
instructions for running your code.
- Grading (% of project grade):
  Write-up (5%)
  Partial implementation (15%)
  Updated write-up (10%)
  Full implementation (70%)
Grading
Homeworks: (6 x 8.33% = 50% of grade)
Midterm: (20% of grade)
Project: (30% of grade)
Grading Policy: Homeworks are due on Friday by 4:00pm. Late submissions
will be penalized by up to 50% (5 pts: up-to-2hrs late, 10 pts: up-to-24hrs, 50pts: up-to-Monday).
Late projects will not be accepted.
You may "challenge" any grade you receive. However, you must contact the
TAs within one week of the grade release date.
You should only contact the instructor if you are unable to reolve the issue with the TAs.