π§ ERP analysis of EEG data from Simon task recordings.
This repository contains a fully automated EEG processing and analysis pipeline for extracting and analyzing N2 waveforms (~200β350 ms) at frontocentral electrodes (Fz, FCz, Cz).
The script processes EEG data from raw Β΄.setΒ΄ files, applies preprocessing steps, and extracts event-related potentials (ERPs) for congruent (S1) and incongruent (S2) trials in the Simon task.
This is how the repo is structured:
/simon-task-eeg/
βββ datasets/ # EEG datasets (input & output)
β βββ sub_100_Simon_eeg.set # Raw EEG data (Subject 100)
β βββ sub_101_Simon_eeg.set # Raw EEG data (Subject 101)
βββ img/
β βββ n2_avg.png
β βββ n2_separate.png
βββ pipeline_1_preprocess_manual.m
βββ pipeline_2_preprocess_automated.m
βββ pipeline_3_preprocess_analysis.m
βββ pipeline_full.m
βββ report.pdf
And this is a simplified example on how to place the pipeline scripts in order to run them in Matlab's EEGLAB:
/eeglab2024.2/
βββ datasets/
β βββ sub_100_Simon_eeg.set
β βββ sub_101_Simon_eeg.set
βββ eeglab.m
βββ pipeline_full.m
...
After placing the pipeline_full.m
in the EEGLAB directory, run in Matlab's console:
pipeline_full