psychopy.org | Reference | Downloads | Github

Importing Data to Matlab

Hi all,

I am new to PsychoPy and am having trouble when trying to start analysis on my data.
Pyschopy only does CSV, log, and Psydat output files to my knowledge (please let me know if I am wrong). Since this is the case, I am having trouble import that data from those files types into matlab.

I am doing a simple button pressing task for those in motor recover. The task is just press the button as many times as they can when the stimulus appears. The stimulus records the number of button presses during each period properly and the file is created and saved.

My problem is that it saves all the presses for each stimulus appearance in their own cell. I.e they press the button 30 times inside the first stimulus then it will output 30 button presses into a single cell. [1,1,1,1,1,1,1,…]
Is there a way to import this cell to matlab? I can’t seem to get it to do so cause any import is looking for a singular value inside each cell and therefore won’t import a cell array.

Please let me know if you have any suggestions. Thank you

Most csv importers will put information into a single cell if it is encapsulated in quotes. Try opening the file in a text editor and replacing all instances of [ with '[ and similarly ] with ]'

That should at least allow the file to be imported correctly. But you are then going to need to use some code in Matlab to further process and extract the values from within that cell.