Events Segmentation in EEGLAB

11 ビュー (過去 30 日間)
Khan Muhammad Adeel Khan
Khan Muhammad Adeel Khan 2021 年 4 月 12 日
編集済み: Prasanna 2024 年 4 月 23 日 8:13
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.

回答 (1 件)

Prasanna
Prasanna 2024 年 4 月 23 日 8:12
編集済み: Prasanna 2024 年 4 月 23 日 8:13
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.

カテゴリ

Help Center および File ExchangeEEG/MEG/ECoG についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by