Working with Matlab

 

Introduction
Homework assignments throughout the course will be written  in MATLAB. Matlab is a C-based interpreter. The basic structures in Matlab are vectors and matrices and as such Matlab is appropriate for Image Processing.

Where Do I find Matlab?
At Univeristy of Haifa,  Matlab is available on the PCs in the computer labs.  Matlab can be installed on your home computer if you have a licensed package. You can use a student version of Matlab (which are not expensive).
Matlab Manuals and Reference Guides are available in the library.  Very good tutorials are also available on the web (see relevant resources below).  If all else fails, there is always the "help" command in Matlab.

How do I start Matlab?
On the lab PCs : Find the Matlab Icon.
Double clicking on the icon will start the Matlab environment.
A shell window with the ">" prompt will be opened. This is the command line.
You can also start Matlab by double clicking on a matlab file (XXX.m) in which case the Matlab environment will start and a editor/debugger window will be opened with the file.

How do I work with Matlab?
The recommended way of working in Matlab is to open Matlab in one window and open the Matlab editor in another window. Select commands in the editor then press F9 (run). This way you can rerun commands, discover your errors, and interactively build your scripts and functions (don't forget that Matlab is an interpreter based language).  The Matlab environment provides an editor/debugger which checks syntax and can run the edited file.

Can I use Matlab Toolboxes?
Mathworks also provides toolboxes which are a collection of functions associated with a specific topic. Relevant toolboxes might include: image processing toolbox, signal processing toolbox, optimaization toolbox, etc. However you must obtain instructors permission to use functions from these toolboxes in your assignments. typically, assignments should be based on standard Matlab functions (not in toolboxes).
You may use the Image processing function used in the Image processing Course at U of Haifa.

What do I hand in as homework?
In the homework assignments you will have to write "programs" in Matlab. In practice this will usually mean to write a function (an m-file). Your function may call other functions which you have created. Your homework will be evaluated interactively by calling your function with various inputs.

How do I hand in  homework?
Since homework checking will be performed interactively you will have to submit all m-files associated with your homework.  Homework will be submitted on CDs or via email (as directed by your instructor). Make sure student names and i.d. are clearly marked.

How will homework be graded?
Checking will be interactive. Points will be given per correct output for each input. The efficiency of your algorithm will be checked as well. Try to avoid loops in your program if  Matlab enables it.  Points will also be given for clean and well documented m-files!!! Make sure you write documentation at the head of each function/file and also in the midst (see example m-files). Make sure your Names and Student I.D.s are also in the documentation at the head of the file. Homework must be submitted ON TIME. Penalty points (10) will be deducted for every day beyond the deadline.  

Matlab Resources: