Open-Source Software from Alex Petrov

This is some software, mostly in Matlab, that I have written for various purposes. I would be delighted to know that people are finding this useful for their research. Feel free to use whatever you please, at your own risk, and under the GNU General Public License. Any suggestions and/or bug reports will be appreciated. Good luck!


The software is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License and the Free Software Foundation for more details.

The software is freely available and freely redistributable, according to the conditions of the GNU General Public License. You may not distribute the software, in whole or in part, in conjunction with proprietary code. That means you only have my permission to distribute a program that uses my code if you also make freely available (under the terms of the GNU GPL) the source code for your whole project. You may not pass on the software to another party in its current form or any altered, embellished or reduced form, without acknowledging the author and including a copy of the GNU GPL.

Utilities (194 KB) Readme Contents License

This archive contains Matlab software supporting the day-to-day work of a cognitive modeler with an interest in psychophysics and statistics. The particular subfolders, or "toolboxes" included in this release are:

Most of these contain just a few one-line functions, but they can enhance one's productivity considerably. There are also some non-trivial algorithms, such as locally weighted regression. Each toolbox has its own Contents.m file -- go there for details.

Hebbian Perceptual Learning Model (10.9 MB) Readme Installation instructions License

This archive contains Matlab software implementing the perceptual learning model of Petrov, Dosher, & Lu (2005, 2006).

There are numerous transcripts (*.txt files) of all sorts of Matlab sessions taken during the development and fitting the model. Use them as guidance. Also, make sure to run PLM_demo. It shows how to generate images, pass them through the representational subsystem of the model (PLFrontend), generate a representation cache, generate a non-stationary presentation sequence, run the learning task-specific subsystem of the model (PLM_Hebb2), and finally analyze and plot the model performance. Check it out!

Project page Publications install-transcript demo-transcript

ANCHOR Model ReadMe Contents License

This archive contains Matlab software implementing the ANCHOR model of category rating and absolute identification (Petrov & Anderson, 2005). The main directory contains the implementation of the ANCHOR model itself (anchor2.m) as well as a model-tracking version (anchor2mt.m) for parameter fitting (Petrov, 2001). Various subdirectories provide tools for analysing the stimulus-response sequences generated by the model and comparing them to human data.

Project page Publications

Psychophysical Experiments

The PLModel implementation page contains PsychToolbox-2. software that administered the two perceptual learning experiments used to validate and test the model. Both experiments tested perceptual learning in an orientation-discrimination task in non-stationary contexts. Similar programs implementing several other perceptual learning experiments are available from Alex Petrov upon request. Check the validity of this page's XHTML Check the validity of this site's Cascading Style Sheet Page maintained by Alex Petrov
Created 2005-04-07, last updated 2008-02-22.