-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDenoise.m
More file actions
20 lines (17 loc) · 778 Bytes
/
Copy pathDenoise.m
File metadata and controls
20 lines (17 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function eeg = Denoise(EEG,low,high)
EEG = EEG';
EEG = EEG * 10^6;
EEG = pop_importdata('dataformat','matlab','nbchan',16,'data',EEG,'setname','train1','srate',256,'pnts',0,'xmin',0);
EEG = eeg_checkset( EEG );
EEG = pop_reref( EEG, []);
EEG = eeg_checkset( EEG );
EEG = pop_eegfiltnew(EEG, 'locutoff',low,'hicutoff',high,'plotfreqz',1);
EEG = eeg_checkset( EEG );
EEG = eeg_checkset( EEG );
EEG = pop_clean_rawdata(EEG, 'FlatlineCriterion','off','ChannelCriterion','off','LineNoiseCriterion','off','Highpass','off','BurstCriterion',20,'WindowCriterion','off','BurstRejection','off','Distance','Euclidian');
EEG = eeg_checkset( EEG );
EEG = eeg_checkset( EEG );
close all
eeg = EEG.data;
eeg = eeg';
end