Skip to content

Laboratory of Neuropsychology

Getting Started

Obtaining NIMH MonkeyLogic

NIMH MonkeyLogic can be obtained from the download page.

Software Installation

You can use either a MATLAB app installer or a zip file.

Using a MATLAB app installer

Double-click the downloaded *.mlappinstall file. It will open MATLAB and pop up a question dialog as below. Click the [Install] button and NIMH MonkeyLogic will be added to the MATLAB menu. If this process fails for any reason, you can manually open MATLAB and install the package by clicking the [Install App] menu.

The installation directory is dependent on the version of your MATLAB.

\your user directory\Documents\MATLAB\Add-Ons\Apps (R2015b or later)
\your user directory\Documents\MATLAB\Apps (R2015a or earlier)

Using a zip file

Decompress the zip file to a directory that you choose and add the directory to the MATLAB path. You can add the subdirectories as well but it is not necessary.

Starting NIMH MonkeyLogic

Click the [NIMH MonkeyLogic] icon on the MATLAB APPS menu (MATLAB app installer) or type "monkeylogic" on the MATLAB command window (zip file installation), depending on your installation method.

NIMH MonkeyLogic comes with a delayed match-to-sample task and many other examples. They are under the "task" directory of the MonkeyLogic directory. To start a task, choose a conditions file by clicking the [Load a conditions file] button on the MonkeyLogic GUI (left in the below figure) and then hit the [Run] button.

You can run a task without a DAQ board or input devices, by activating the simulation mode in the pause menu. In the simulation mode, most common input signals are replaced with mouse and key inputs, like the following.

  • Eye: mouse
  • Joystick: cursor keys
  • Touch: mouse click
  • Buttons: key '1' to key '0'

Data Files Supported by NIMH MonkeyLogic

NIMH MonkeyLogic supports its own data file format, called BHV2 (*.bhv2), as well as HDF5 (*.h5) and MAT (*.mat). BHV2 ia a private format that is based on a simple recursive algorithm. It provides decent read and write performance and is most recommended.

The mlread function provides a unified read interface for all the formats. Type "help mlread" on the MATLAB command windows for details.