Lab 1

The objective of the first practice lab is to acquire basic Matlab literacy, in particular familiarity with the vector and matrix operations. For newcomers to matlab a good source is the tutorial below. Additionally, there are many others on the web as well as the official Mathworks tutorial available from the matlab "helpdesk".

In Ela Pekalska, Marjolein van der Glas' Matlab tutorial particularly focus on thses chapters:

	Thoroughly:
	  1,2,4: Basics, vectors and matrices
	  7.1: 2D plotting

	Cursorly: (Should be familiar already from imperative languages)
	  6 Control structures
	  3 Functions
	  5 Text strings and cell arrays
	
(Legacy) You can find the lab presentation here.

Exercises

Exercise 1: Vectorize the given script and compare the running time of both implementations.
Exercise 2: Fill in the script details to perform the required image modifications.

Sample Image Manipulations

Additional Notes

Setting Matlab mode in Emacs

	If you wish to program Matlab scripts and functions with Emacs and want to
	install a mode for Matlab files ('.m' files) (automatic indentation, etc)
	do the following

	1- Download and save this file in your home directory
	http://www.cs.ualberta.ca/~sleonard/courses/cs340/seminars/.matlab.el

	2- In your home directory, edit your .emacs file (create it if you don't
	have one) and add the following lines

	(autoload 'matlab-mode "/home/sleonard/.matlab.el" "Enter Matlab mode." t)
	(setq auto-mode-alist (cons '("\\.m\\'" . matlab-mode) auto-mode-alist))
	(autoload 'matlab-shell "/home/sleonard/.matlab.el" "Interactive Matlab
	mode." t)

	and replace both /home/sleonard/ by the full path of your home directory
	(where you saved the .matlab.el file)

	3- You can customize the mode. Go at line 71 in .matlab.el and remove the
	';;' to enable the features you want.


	-Simon