0001
0002
0003
0004 path = 'd:\MyDocuments\emse_data\ptsd-pet\link14hz\';
0005
0006
0007 infile_ext = '_link14hz.txt';
0008 outfile_ext = 'sa_dif_link14hz.txt';
0009
0010 format = '%12.4f ';
0011
0012
0013 groups = {'c' 'p'};
0014 subjects = {'01' '02' '03' '04' '05' '06' '07' '08' '09' '10'};
0015 conditions = {'oac' 'ouc'};
0016
0017 for g = 1:length(groups)
0018 for s = 1:length(subjects)
0019 subj = strcat(char(groups(g)),char(subjects(s)));
0020
0021
0022 infile1 = strcat(path,subj,conditions(1),infile_ext);
0023 infile2 = strcat(path,subj,conditions(2),infile_ext);
0024
0025 data1 = eeg_ascii_load(infile1);
0026 data2 = eeg_ascii_load(infile2);
0027
0028
0029 dif = data1 - data2;
0030
0031
0032 outfile = strcat(path,subj,outfile_ext);
0033 eeg_ascii_write(outfile,dif,format);
0034
0035
0036
0037 end
0038 end