How to write loop in MATLAB?

2 ビュー (過去 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.
Walter Roberson
Walter Roberson 2020 年 11 月 26 日

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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