Skip to main content
Skip table of contents

Introduction to VPixx MATLAB documentation

Overview

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:

MATLAB
[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.

https://www.youtube.com/watch?v=wogLA8g-wa0

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

Next, in MATLAB type:

MATLAB
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 the VPixx Software Tools (C:\Program Files\VPixx Technologies\Software Tools\Matlab\mexfiles\), and then navigate to the folder representing your operating system and installation.

Copy the Datapixx.mex* file from that folder to the filepath obtained above. You can overwrite the existing Datapixx.mex file in that directory.

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:

MATLAB
Datapixx

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:

MATLAB
Datapixx('[function]?')

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 support@vpixx.com. 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.