[Eeglablist] Despite following Guideline, Cannot Import ".mat" file into EEGLAB

Iversen, John jiversen at ucsd.edu
Mon Aug 23 13:34:39 PDT 2021


Hi Samuel,

I expect the problem is here:

The ".mat" file has an EEG dataset (channels*times*trials). *It also has
fields like channel labels, channel locations and so on.*

Whereas the documentation states:

Note: When reading a MATLAB .mat file, EEGLAB assumes it contains only one MATLAB variable


So you could a) re-save the dataset with only a single variable containing the EEG data, or b) follow the steps here to move the EEG data field into a variable and then import from that variable: https://urldefense.proofpoint.com/v2/url?u=https-3A__eeglab.org_tutorials_04-5FImport_Importing-5FContinuous-5Fand-5FEpoched-5FData.html-23importing-2Da-2Dfile-2Dcontaining-2Da-2Dmatlab-2Dstructure&d=DwIFAg&c=-35OiAkTchMrZOngvJPOeA&r=kB5f6DjXkuOQpM1bq5OFA9kKiQyNm1p6x6e36h3EglE&m=Bq9hs1QWa2m6_RbY78CN1SxAdbVu8Y3mifATm4M1piM&s=SBW0qKXAr_jTybvl2MwVbffCM2YNX-EWDDOtK07hy8U&e= 

Let us know if you have any further problems. Be sure to include any error message you encounter.

Best,

John




I have followed the instructions in the EEGLAB.org<https://urldefense.proofpoint.com/v2/url?u=http-3A__EEGLAB.org&d=DwIFAg&c=-35OiAkTchMrZOngvJPOeA&r=kB5f6DjXkuOQpM1bq5OFA9kKiQyNm1p6x6e36h3EglE&m=Bq9hs1QWa2m6_RbY78CN1SxAdbVu8Y3mifATm4M1piM&s=bujJ6D2qjrFhBxdVSI2ojOSgHZUwkQ9Jbx_eQEDlKko&e= > (
https://urldefense.proofpoint.com/v2/url?u=https-3A__eeglab.org_tutorials_04-5FImport_Importing-5FContinuous-5Fand-5FEpoched-5FData.html-23acquiring-2Deeg-2Ddata-2Dfrom-2Dwithin-2Deeglab&d=DwIBaQ&c=-35OiAkTchMrZOngvJPOeA&r=kB5f6DjXkuOQpM1bq5OFA9kKiQyNm1p6x6e36h3EglE&m=koCfronc1wsMAjOH6VyOPCRky4JlPFvR-eAIhXfgxmI&s=DFXaKiVsjPgOElOALHaUH094EJtvi1dRIfu9Oc255C0&e= ),
but I still cannot input the ".mat" file into EEGLAB.

The ".mat" file has an EEG dataset (channels*times*trials). It also has
fields like channel labels, channel locations and so on.

What I have been trying to do is as follows. In EEGLAB, I go to File >
Import data > Using EEG functions and plugin > From ASCII/float file or
Matlab array. Then, I see a window pop up. In this window, I choose
"Matlab.mat file" in the drop-down menu, and then I browse the ".mat" file
I want to import. For fields like "Data sampling rate", "Time points per
epoch", "Start time" and "Number of channels", I just input numbers
according to the EEG dataset in the ".mat" file.

I have tried my best to find a way. I have also searched the problem on the
web, but I still cannot solve it. I sincerely hope that someone could
provide help on this one. Thank you so much in advance!

Best regards,
Samuel



John R. Iversen, PhD
University of California, San Diego
Swartz Center for Computational Neuroscience
Institute for Neural Computation
9500 Gilman Dr #0559
La Jolla, CA 92093
jiversen at ucsd.edu<mailto:jiversen at ucsd.edu>






More information about the eeglablist mailing list