[Eeglablist] Reading .mat file to EEGLAB

Poikonen Hanna hanna.poikonen at gess.ethz.ch
Mon Jul 20 09:59:42 PDT 2020


Hi all,

I have a simple question I didn't find the correct EEGLAB command for.

I’m trying to read in EEG data to EEGLAB (v2019.1 in MATLAB version R2019b) which is saved as .mat file. Previously, I’ve used successfully the command pop_biosig to read in .bdf files with a older version of the EEGLAB but it seems not to work with .mat files (below you can see the error message). Which command shall I use? I need to read the EEG data from the .mat files into EEGLAB to be able to re-reference, bandpass filter to later form .set and .study files.


Best regards,

Dr. Hanna Poikonen
Postdoctoral researcher
Professorship of Learning Sciences and Higher Education, ETH Zurich



For the .mat file, I get the following error message:

Command:
EEG = pop_biosig([ctrlpth condi '_Control' num2str(subj) '_WholeStimulusData.mat'], ...
    'channels', [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16], ...
    'ref', [1 2 3 4 5 6 7 8 9 10 11 12]);

Error message:
Warning: File: sopen.m Line: 8447 Column: 87
Unrecognized pragma "%#26".
> In pop_biosig>readfile (line 238)
  In pop_biosig (line 165)
  In esikasittely_05_100Hz_LIVELab (line 87)
Reference to non-existent field 'brainvision'.

Error in sopen (line 6515)
        elseif flag.brainvision,

Error in pop_biosig>readfile (line 238)
dat = sopen(filename, 'r', channels,'OVERFLOWDETECTION:OFF');

Error in pop_biosig (line 165)
[dat DAT interval] = readfile(filename, g.channels, g.blockrange, g.memorymapped);

Error in esikasittely_05_100Hz_LIVELab (line 87)
        EEG = pop_biosig([ctrlpth condi '_Control' num2str(subj) '_WholeStimulusData.mat'], ...





More information about the eeglablist mailing list