[Eeglablist] EEGLAB script
Radha Kumari (PGR)
2375059K at student.gla.ac.uk
Thu Dec 10 06:35:52 PST 2020
Hello
I am trying to script the process of rejecting manual noisy epochs, When I run the following lines individually one by one it works like a charm, but when I implement the same thing together in the code it doesn't update the eeglab main window even when I use eeglab redraw and I end up getting nothing in the when I scroll data on pop_rej_menu GUI, and neighter is my main EEG lab window reflecting data. It is very weird,I have tried it different ways but everytime I see that one by one commands are fine but in code whe its supposed to run these lines automatically it doesn't give me what I want. Whatis the issue?
disp('Processing baseline data...')
[ALLEEG EEG CURRENTSET ALLCOM] = eeglab;
EEG = pop_loadset(filepath);
[ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG);
% eeglab redraw
[ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, CURRENTSET, 'overwrite', 'on');
EEG=eeg_regepochs(EEG,'recurrence',1);
[ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG);
% eeglab redraw
[ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, CURRENTSET, 'overwrite', 'on');
pop_rejmenu(EEG,1)
ansUser=input('Enter 1 here after marking trials for rejection( do not forget to click Update marks): ');
if ansUser==1
marked_trials=find(ALLEEG(2).reject.rejmanual==1);
EEG = pop_rejepoch( EEG, marked_trials ,0);
[ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG);
% eeglab redraw
[ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, CURRENTSET, 'overwrite', 'on');
disp('saving processed data...')
pop_saveset(EEG,'filename',filename,'filepath',path);
Thanks and Regards,
Radha
More information about the eeglablist
mailing list