脑电信号的分段处理,
%分段
clear;
sub_name={
% 'mgh_1_1','mgh_1_2','mgh_1_3'};%改名字
% 'kzh_1_1','kzh_1_2','kzh_1_3'};
'mgh_1_1','mgh_1_2','mgh_1_3'};
% 'hcl_3_1','hcl_3_2','hcl_3_3','gxj_4_1','gxj_4_2','gxj_4_3',...
% 'gy_5_1','gy_5_2','gy_5_3'};
% 'mss_5_1','mss_5_2','mss_5_3','yyp_6_1','yyp_6_2','yyp_6_3',...
% 'gy_7_1','gy_7_2','gy_7_3','yym_8_1','yym_8_2','yym_8_3',...
% 'zsn_9_1','zsn_9_2','zsn_9_3','mgh_10_1','mgh_10_2','mgh_10_3'};%改名字
for i=1:3几组数据
sub=strcat(sub_name{i},'.set'); %不改
sub_save=strcat(sub_name{i},'_epoch.set'); %不改
EEG = pop_loadset('filename',sub,'filepath','D:\BISHE\REST-RUNICA-LS\');%改路径
EEG = eeg_checkset( EEG );
EEG = eeg_regepochs(EEG, 'recurrence', 2, 'limits',[0 2], 'rmbase',NaN);
EEG = pop_saveset( EEG, 'filename',sub_save,'filepath','D:\BISHE\FENDUAN-LS\');%保存,改路径
EEG = eeg_checkset( EEG );
end
1