This clip gives a quick intro into the use of functions in MATLAB (http://eclr.humanities.manchester.ac.uk/index.php/Main_Page)
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.