Home > eeg > egis > scripts > make_obslabels.m

make_obslabels

PURPOSE ^

SYNOPSIS ^

function obs_labels = make_outputfname(csdmfname)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function obs_labels = make_outputfname(csdmfname)
0002 
0003 for i = 2:size(csdmfname,1)
0004     subj_check(i) = strcmp(csdmfname(1,1:3),csdmfname(i,1:3));
0005     group_check(i) =  strcmp(csdmfname(1,5:5),csdmfname(i,5:5));
0006     cnd1(i) = strcmp(csdmfname(1,7:7),csdmfname(i,7:7));
0007     cnd2(i) = strcmp(csdmfname(1,8:8),csdmfname(i,8:8));
0008     cnd3(i) = strcmp(csdmfname(1,9:9),csdmfname(i,9:9));
0009     cnd4(i) = strcmp(csdmfname(1,10:10),csdmfname(i,10:10));
0010     cnd5(i) = strcmp(csdmfname(1,11:11),csdmfname(i,11:11));
0011     ref_check(i) = strcmp(csdmfname(1,13:16),csdmfname(i,13:16));
0012 end;
0013 
0014 for i = 1:size(csdmfname,1)
0015     iff = 1;
0016     if sum(subj_check) ~= size(csdmfname,1) - 1
0017         obs_labels(i,iff:iff+3) = [csdmfname(i,1:3) ' '];
0018         iff = iff +4;
0019     end
0020     if sum(group_check) ~= size(csdmfname,1) - 1
0021         obs_labels(i,iff:iff+1) = [csdmfname(i,5) ' '];
0022         iff = iff+2;
0023     end;
0024     if (sum(cnd1) ~= size(csdmfname,1) - 1) 
0025         obs_labels(i,iff) = [csdmfname(i,7)];    
0026         iff = iff+1;
0027     end;
0028     if (sum(cnd2) ~= size(csdmfname,1) - 1) 
0029         obs_labels(i,iff) = [csdmfname(i,8)];
0030         iff = iff + 1;
0031     end
0032     if (sum(cnd3) ~= size(csdmfname,1) - 1) 
0033         obs_labels(i,iff) = [csdmfname(i,9)];
0034         iff = iff + 1;
0035     end
0036     if (sum(cnd4) ~= size(csdmfname,1) - 1) 
0037         obs_labels(i,iff) = [csdmfname(i,10)];
0038         iff = iff + 1;
0039     end
0040     if (sum(cnd5) ~= size(csdmfname,1) - 1) 
0041         obs_labels(i,iff) = [csdmfname(i,11)];
0042         iff = iff + 1;
0043     end
0044     if sum(ref_check) ~= size(csdmfname,1) - 1
0045         obs_labels(i,iff:iff+4) = [' ' csdmfname(i,13:16)];
0046     end;
0047 end;

Generated on Sun 24-Mar-2019 04:00:51 by m2html © 2003