Matlab 2017 and Later and NeuroExplorer Version 4

Version 4 Problem

Several NeuroExplorer version 4 users reported that they were unable to get data from Matlab when using Matlab 2017a and later. The following error messages are displayed by NeuroExplorer:

"Matlab variable n_1 does not exist or variable is not a matrix"

and

"Matlab workspace contains no matrices. Please load or generate some data in Matlab and try again."

The problem is in the breaking change in Matlab. To determine the type of Matlab object x, NeuroExplorer executes the following Matlab command:

class(x)

In the previous versions of Matlab, the following was returned by Matlab (after removing line breaks and spaces):

ans=double

In Matlab version 2017a and later, the result is:

ans='double'

NeuroExplorer version 4 checks that the result of class(x) is double without quotes. Unfortunately, Matlab made a breaking change and the result of class(x) is ‘double’ (with quotes), and NeuroExplorer version 4 determines that x is not a double matrix.

Version 4 Workarounds

If you are using NeuroExplorer version 4, you have the following options:

  1. Uninstall Matlab 2017a or later and install an earlier version of Matlab
  2. Upgrade your NeuroExplorer license to version 5 (contact info@neuroexplorer.com for an upgrade quote)
  3. Save your data in Matlab in .nex file and open .nex file in NeuroExplorer (use the scripts from HowToReadAndWriteNexAndNex5FilesInMatlab.zip to save Matlab data in .nex file)
  4. Use the following scripts:

Download the scripts to this folder

C:\ProgramData\Nex Technologies\NeuroExplorer\Scripts 

and open a script using Script | Open Script menu command.