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"
"Matlab workspace contains no matrices. Please load or generate some data in Matlab and try again."
Note:NeuroExplorer version 5 does not have this problem.
The problem is in the breaking change in Matlab. To determine the type of Matlab object x, NeuroExplorer executes the following Matlab command:
In the previous versions of Matlab, the following was returned by Matlab (after removing line breaks and spaces):
In Matlab version 2017a and later, the result is:
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:
- Uninstall Matlab 2017a or later and install an earlier version of Matlab
- Upgrade your NeuroExplorer license to version 5 (contact firstname.lastname@example.org for an upgrade quote)
- 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)
- Use the following scripts:
- use GetMatlab2ColumnMatrixAsContVarWithTs.nsc script to import a 2-column matrix with timestamps and continuous values as a continuous variable
- use GetMatlabVectorAsContVar.nsc script to import a 1-column matrix with continuous values as a continuous variable
- use GetMatlabTimestampVector.nsc script to import a 1-column matrix with timestamps as an event variable
Download the scripts to this folder
and open a script using Script | Open Script menu command.