Matlab Cookbook
Welcome to the Matlab Cookbook. Please note that this site was last updated in 2009, and PsychToolbox interfaces may have changed since then!
The goal of the cookbook is to provide solutions to common tasks and problems in psychological experiments. Some of the code requires the PsychToolbox software package for Matlab.
Most of the code snippets contained here can be copied and pasted right into the Matlab command window, if you want to see them in action.
- Variables
- String processing
- Numbers
- File IO
- Arrays
- Functions
- Presenting visual stimuli
- Presenting auditory stimuli
- Collecting data
- Experiment design
Other useful information
This site is created by Winston Chang. It was recently migrated from a MoinMoin wiki to a static site generated by Markdoc, and there may have been some errors in the translation. If you find any errors, please report them to winston@stdout.org.

This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.