Events Segmentation in EEGLAB
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello ! I am having an EEG data from more than 100 participants and it consist of 120 events. How can I segment the events into half as I am using eeglab script to process the data ? I want to analyze the first half and second half separately. Thanking you in anticipation.
0 commentaires
Réponses (1)
Prasanna
le 23 Avr 2024
Modifié(e) : Prasanna
le 23 Avr 2024
Hi,
To segment and analyse the first and second halves of EEG events separately for each participant using EEGLAB, you can identify the events you want to segment around, create epochs for these events, and then divide the dataset based on these epochs. Given that you have 120 events per participant, and you wish to split these into two halves, here's a sample code for the same:
participants = dir('/path/to/your/data/*.set'); % Adjust the path and extension if necessary
for i = 1:length(participants)
filename = participants(i).name;
EEG = pop_loadset('filename', filename, 'filepath', '/path/to/your/data/');
% Segment into first half
EEG_firstHalf = pop_selectevent( EEG, 'event', [1:60], 'deleteevents', 'off', 'deleteepochs', 'on', 'invertepochs', 'off');
% Segment into second half
EEG_secondHalf = pop_selectevent( EEG, 'event', [61:120], 'deleteevents', 'off', 'deleteepochs', 'on', 'invertepochs', 'off');
% Analysis code for each half goes here
end
For more details on the “pop_selectevent” function you can look at the documentation provided here: https://sccn.ucsd.edu/~arno/eeglab/auto/pop_selectevent.html
Hope this helps.
0 commentaires
Voir également
Catégories
En savoir plus sur EEG/MEG/ECoG dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!