MATLAB Programming/Psychtoolbox/Version independent scripts

From Wikibooks, open books for an open world
< MATLAB Programming‎ | Psychtoolbox
Jump to: navigation, search
Back to MATLAB Programming/Psychtoolbox

If you have to write code that can be used on various platforms (OS 9, OS X, and windows) you will run into some problems with psychtoolbox. This is due to different versions that run on different platforms and having different procedures for handling the screen.

Using a few scripts that handle these differences, and calling these scripts can make your programs a little more universally accepted.

The scripts listed here will be changing often to match the current versions of the psychtoolbox, and you should check to see if your version is up to date. If you make any changes to the scripts on these pages, please make note of the date of the revision and what you changed, so that users of the scripts will know what was updtated.

Scripts and functions[edit]

  • ptb_ind_screen_setup.m - April 7, 2005 - This script is used to set up the psychtoolbox screen function in a

universal way to allow the same program to be run on windows, OS X, and classic mac.

This function is set up to allow the same code to be used in the new and old versions of psychtoolbox
screen_setup should be called at the begining of your script. This should be called whenever you want to put what you have drawn on the screen.

  • ptb_ind_general_setup.m - July 6, 2005 - Used for other general setup information (directory seperation - / or :, left arrow right arrow interpretations, etc)

Examples of use[edit]