Skip to content

exporting EEGlab data from matlab to non-matlab files so other programs can read them (such as R-studio)

License

Notifications You must be signed in to change notification settings

CognitiveNeuroLab/trial_by_trial_data_export_eeglab

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

trial by trial data export eeglab

project_description
Explore the code »

· Report Bug · Request Feature .

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact

About The Project

This project is build so that one can automatically export trial by trial data from Matlab to any other file type so that other programs (such as Rstudio) can read the data. This code uses both EEGlab functions and EEGlab structures. This means that your data needs to at least be epoched using EEGlab.

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

Software: You need to have a copy of EEGlab (this script works for version eeglab2019_1)

Data: you need to have you .set files epoched and there need to be triggers in this epoched data.

Roadmap

To use EEGlab In matlab, set path --> add with Subfolders... -->the main eeglab folder --> close Or you can hardcode this:

addpath(genpath('theplacewhereyouhavethefolder\eeglab2019_1\'));

Set-up your variables:

group = 1; 
load_path  = 'C:\data\';
save_path= 'C:\results\';
typefile= '.xlsx'; 
time_window = [];
name_timewindow= '';
chan = '';  
name_file = '_epoched'; 
events_in_epoch_cond1 = {'1'}; 
events_in_epoch_cond2 = {'15'}; 
events_in_epoch_cond3 = {}; 

*Groups

you can choose up to 4 groups. These will be assiged a number (1,2,3,4) so that the groups can be indentified in your next program.

*typefile

final file can be saved as mat, txt, dat, csv, xls, xlsm, xlsx or xlsb

*time_window

the script will give you 1 averaged amplitude for the time (in ms) you input in this variable. For example input here the time of your N1/MMN/P2 or whatever is of interest

*name_timewindow

this is for naming the file at the end of the script. to prevent overwriting files if there are mulitple times of intresset

*name_file

this is the part of the .set file that is the same for all your participants (so without the ID)

*events_in_epoch_cond#

you choose here which trigger or tiggers need to be included in the epoch. if you add multiple, it will not necessarily have them all in the epoch together.

*promts

the first promt is to see if you have your .set files in indivual folders per subject or in one general folder
the second promt will ask how many condtions need to be looked at. these are the ones you defined in events_in_epoch_cond#

See the open issues for a list of proposed features (and known issues).

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Douwe Horsthuis - douwejhorsthuis - douwehorsthuis@gmail.com

Project Link: https://github.com/DouweHorsthuis/trial_by_trial_data_export_eeglab

About

exporting EEGlab data from matlab to non-matlab files so other programs can read them (such as R-studio)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • MATLAB 100.0%