I got a batch of processed datasets in eeglab. I want to export all of them into txt in a batch, however, it seems like must be done file by file.
I am new to eeglab and matlab. Could someone please help me with this?
I got a batch of processed datasets in eeglab. I want to export all of them into txt in a batch, however, it seems like must be done file by file.
I am new to eeglab and matlab. Could someone please help me with this?
Copyright © 2021 Jogjafile Inc.
This code was tested by being run in my directory with EEGLAB in it. In my case there are 2 data sets with associated .fdt files in that directory as well. If your .set files are in a different directory from EEGLAB, you will have to change the code to find them there. The script must be in the EEGLAB directory, or else the EEGLAB source must be in your PATH, but I think that putting EEGLAB's code in your PATH is not a recommended setup.
I use regular expression (
regexp
) to find which files are .set files and to build the output filenames. If you are not familiar with regular expressions, just do a websearch.By the way, I knew what functions to call from EEGLAB to load the .set files by checking
>> EEG.history
. That will show all the Matlab code that went on behind the GUI scenes in your EEGLAB session.EEGLAB stores the data in vectorized orientation. If you want multiplexed simply transpose the matrix: