Skip to main content
Skip table of contents

Introduction to VPixx MATLAB documentation


All VPixx devices with API support can be controlled via MATLAB functions stored in a MATLAB Executable File (mex file) called Datapixx.mex. Functions may be called using the general format:

[output] = Datapixx('Command', arguments);

Before using these tools, you will need to install this Datapixx.mex file in your Psychtoolbox-3 folder. Follow the installation steps below to get started.

Installing our MATLAB API (all operating systems)

Follow the text instructions below, or use our walkthrough video to guide you through the steps.

Psychtoolbox-3 can be downloaded following instructions here: Once you have installed Psychtoolbox-3, please install VPixx Software tools if you have not done so already.

Next, in MATLAB type:

which Datapixx

This will return the filepath of the Datapixx.mex file currently installed in Psychtoolbox-3. You will need to replace this file with the newest version of Datapixx.mex provided in our software tools.

Psychtoolbox-3 comes with its own version of Datapixx.mex, which is outdated. You will need to replace this file with the one from our software downloads every time you update your VPixx software or Psychtoolbox-3.

Make a note of the filepath, then close MATLAB.

Navigate to your local installation of VPixx Software Tools

Operating system



C:\Program Files\VPixx Technologies\Software Tools\Matlab\mexfiles\Windows\matlab


/usr/local/share/VPixx Software Tools/Matlab/mexfiles/linux/matlab/


Macintosh HD > Library > Application Support > VPixx Technologies > Software Tools >Matlab > mexdev > macOS > matlab

Copy the Datapixx.mex file from that folder to the filepath obtained above. You can overwrite the existing Datapixx.mex file in that directory. Note the exact file type may vary with operating system.

When you restart MATLAB, you should be able to use the new mex file. You can check your current release information by entering the following in the command window:


This will return a list of all commands in the Datapixx.mex library, followed by release number and date.

Exploring Datapixx() functions and documentation

Our library of MATLAB functions can be accessed within MATLAB by typing Datapixx into the command window. This will return a list of all Datapixx commands available for all of our devices.

To read the documentation for these functions, use the following syntax:


Where [function] is the name of the command you wish to learn more about.

Useful Demos

A growing library of code demos can be found in this documentation. Please see our MATLAB Demo Library.

Need help?

If you encounter any problems with your VPixx device and our MATLAB API, check out the MATLAB section of our FAQ for helpful tips.

Still stuck? Contact our support team at We will be very happy to provide assistance.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.