Here are some notes from a seminar I taught in 2006 using Matlab and the Psychophysics Toolbox 3. They have not been updated for more recent functionality.
Introduction to Matlab, tips and tricks
Static images
Timing and input
Animation I
Animation II
Useful link
Psychophysics Toolbox