Home > database > verify_subs.m

verify_subs

PURPOSE ^

Removes subjects associated with the experiment info who aren't on the list

SYNOPSIS ^

function expinfo = verify_subs(expinfo,proc_subs)

DESCRIPTION ^

 Removes subjects associated with the experiment info who aren't on the list
 in proc_subs

 expinfo = verify_subs(expinfo,proc_subs);

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function expinfo = verify_subs(expinfo,proc_subs)
0002 
0003 % Removes subjects associated with the experiment info who aren't on the list
0004 % in proc_subs
0005 %
0006 % expinfo = verify_subs(expinfo,proc_subs);
0007 %
0008 
0009 % 10/29/06 Petr Janata
0010 
0011 nexp = length(expinfo);
0012 
0013 for iexp = 1:nexp
0014   bad_sub_idxs = find(~ismember(expinfo(iexp).subs.ids,proc_subs));
0015   
0016   if ~isempty(bad_sub_idxs)
0017     nbad = length(bad_sub_idxs);
0018     
0019     fprintf('\tRemoving data for %d subjects not on inclusion list\n', nbad);
0020     
0021     expinfo(iexp).subs.names(bad_sub_idxs) = [];
0022     expinfo(iexp).subs.ids(bad_sub_idxs) = [];
0023     expinfo(iexp).subs.nsess(bad_sub_idxs) = [];
0024     expinfo(iexp).subs.ages(bad_sub_idxs) = [];
0025     
0026     if isfield(expinfo.subs,'sess')
0027       expinfo(iexp).subs.sess(bad_sub_idxs) = [];
0028     end
0029     
0030   end % if ~isempty(bad_sub_idxs)
0031 end % for iexp=

Generated on Wed 20-Sep-2023 04:00:50 by m2html © 2003