How to write loop in MATLAB?
1 view (last 30 days)
Show older comments
Shuting LI
on 12 Nov 2020
Commented: Walter Roberson
on 26 Nov 2020
EEG.etc.eeglabvers = '2020.0'; % this tracks which version of EEGLAB is being used, you may ignore it
EEG = pop_loadset('filename','M04_AD1.set','filepath','C:\\EEG_OVGU\\AD1\\');
EEG = eeg_checkset( EEG );
EEG = pop_resample( EEG, 250);
EEG = pop_saveset( EEG, 'M04_AD1d' );
EEG = eeg_checkset( EEG );
EEG.etc.eeglabvers = '2020.0'; % this tracks which version of EEGLAB is being used, you may ignore it
EEG = pop_loadset('filename','M05_AD1.set','filepath','C:\\EEG_OVGU\\AD1\\');
EEG = eeg_checkset( EEG );
EEG = pop_resample( EEG, 250);
EEG = pop_saveset( EEG, 'M05_AD1d' );
EEG = eeg_checkset( EEG );
EEG.etc.eeglabvers = '2020.0'; % this tracks which version of EEGLAB is being used, you may ignore it
EEG = pop_loadset('filename','M07_AD1.set','filepath','C:\\EEG_OVGU\\AD1\\');
EEG = eeg_checkset( EEG );
EEG = pop_resample( EEG, 250);
EEG = pop_saveset( EEG, 'M07_AD1d' );
EEG = eeg_checkset( EEG );
EEG.etc.eeglabvers = '2020.0'; % this tracks which version of EEGLAB is being used, you may ignore it
EEG = pop_loadset('filename','M08_AD1.set','filepath','C:\\EEG_OVGU\\AD1\\');
EEG = eeg_checkset( EEG );
EEG = pop_resample( EEG, 250);
EEG = pop_saveset( EEG, 'M08_AD1d' );
EEG = eeg_checkset( EEG );
EEG.etc.eeglabvers = '2020.0'; % this tracks which version of EEGLAB is being used, you may ignore it
EEG = pop_loadset('filename','M10_AD1.set','filepath','C:\\EEG_OVGU\\AD1\\');
EEG = eeg_checkset( EEG );
EEG = pop_resample( EEG, 250);
EEG = pop_saveset( EEG, 'M10_AD1d' );
EEG = eeg_checkset( EEG );
EEG.etc.eeglabvers = '2020.0'; % this tracks which version of EEGLAB is being used, you may ignore it
EEG = pop_loadset('filename','M12_AD1.set','filepath','C:\\EEG_OVGU\\AD1\\');
EEG = eeg_checkset( EEG );
EEG = pop_resample( EEG, 250);
EEG = pop_saveset( EEG, 'M12_AD1d' );
EEG = eeg_checkset( EEG );
0 Comments
Accepted Answer
Walter Roberson
on 12 Nov 2020
set_numbers = [4, 5, 7, 8, 10, 12];
for K = set_numbers
setname_in = sprintf('M%02d_AD1.set', K);
setname_out = sprintf('M%02d_AD1d', K);
EEG.etc.eeglabvers = '2020.0'; % this tracks which version of EEGLAB is being used, you may ignore it
EEG = pop_loadset('filename', setname, 'filepath', 'C:\\EEG_OVGU\\AD1\\');
EEG = eeg_checkset( EEG );
EEG = pop_resample( EEG, 250);
EEG = pop_saveset( EEG, setname_out );
EEG = eeg_checkset( EEG );
end
10 Comments
More Answers (0)
See Also
Categories
Find more on EEG/MEG/ECoG in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!