MATLAB code for behavioral and fMRI experiments using PsychToolBox functions. These take TTL and user input and communicate with physiological recording hardware. Some are well commented as a learning tool.