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.