Getting started / Making an experiment

Setup

System requirements >

Installing, Updating, Uninstalling

  • Use pb_install at the MATLAB command line to install PsychBench.
  • Use pb_update to check for updates.
  • Use pb_uninstall if you want to uninstall.
  • Use pb_removePath and pb_addPath if you want to temporarily remove/add back PsychBench to the MATLAB search path without deleting it.

Preferences – pb_prefs

You can type pb_prefs at the MATLAB command line to set preferences for all experiments, e.g. compatibility settings, experiment window size, experiment background color, etc. Setting preferences corresponds to changing default property values for trial, experiment, and device objects. Note you can override any preference in an experiment by setting the object + property in the experiment.

Compatibility settings

If you see problems like failing to open or close the experiment window (especially on Mac, sometimes on Windows), you may want to use pb_prefs → screen → disable Psychtoolbox sync tests and/or enable system compositor (or on MATLAB versions earlier than R2021a: add lines <cd>screen.doSyncTests = -1; screen.useCompositor = true<cd>; to the pb_prefs script). Note this generally reduces timing precision, but Psychtoolbox recommends not running precise timing experiments on such systems anyway. You can still develop and test precise timing experiments and/or run experiments that don’t need precise timing. See screen object properties doSyncTests, useCompositor for details. For more information from Psychtoolbox, see SyncTrouble.