How to write loop in MATLAB?

조회 수: 1 (최근 30일)
Shuting LI
Shuting LI 2020년 11월 12일
댓글: Walter Roberson 2020년 11월 26일
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 );

채택된 답변

Walter Roberson
Walter Roberson 2020년 11월 12일
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
Shuting LI
Shuting LI 2020년 11월 13일
Thank you so much for your help!!!!!!
I set a breakpoint, but MATLAB isn't stopping at the breakpoint.
In addition, I don't see the Step button in the editor.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 EEG/MEG/ECoG에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by