| Reference | Downloads | Github

Importing CSV outputs into Matlab results in variable names prefixed by “x___”

I normally import CSV outputs from PsychoPy into Matlab, using readtable, e.g.
T = readtable('d:\test.csv', 'readvariablenames', true);

However, even though the name of the CSV’s first column is a valid Matlab name (“runNr”), the first column in the Matlab table gets named “x___runNr”:

enter image description here enter image description here

This clearly has something to do with the CSVs produced by psychoPy being in a slightly format different from that expected by Matlab. Strangely, some of them are still read OK, even though they were produced by the same version of psychoPy.

Any thoughts?

Matlab version: 2016a
OS (e.g. Win10): 10
PsychoPy version (e.g. 1.84.x): 3.2.4