-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaltairLoop.m
48 lines (40 loc) · 939 Bytes
/
altairLoop.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
clear;
clc;
tic;
bnds=[.1,30];
chanPercent=[];
fName='OSU-00001-04B-01-ERN.bdf';
subst='ERN.bdf';
outEx='_kukri.mat';
dirName = 'C:\Users\John\Documents\MATLAB\soarData\';
[sub] = subdir(dirName);
metaData=struct2table(sub);
fileList=metaData.name;
ii=fileList(1);
for ij=1:length(fileList)
ij/length(fileList)
ii=fileList(ij);
fName=ii{1};
tf = endsWith(fName,subst);
if tf ~= (0)
try
EEG = pop_biosig(fName);
% [EEG, command] = pop_readbdf(fName);
%snr0 = snrCompare(EEG.data,bnds,EEG.srate);
EEG = altairPreproc(EEG);
%EEG = soarPreproc(EEG,bnds);
outName=append(fName,outEx)
save(outName,'EEG')
load(outName,'EEG')
EEG = eeg_checkset(EEG); clc;
catch
%chanPer=1;
end
end
%chanPercent=[chanPercent; chanPer];
%save('soarSnrResample5.mat','chanPercent');
end
%finalMean=mean(chanPercent);
%truPer=chanPercent(find(chanPercent~=1));
%trueMean=mean(truPer);
toc;