Home > data-access > get_trials.m

get_trials

PURPOSE ^

Finds the frame numbers of the starts and ends of the trials

SYNOPSIS ^

function [ trials ] = get_trials( subject_id , param)

DESCRIPTION ^

Finds the frame numbers of the starts and ends of the trials
   get_trials(SUBJECT_ID)
       Convenience function, equivalent to x = get_timing(subject_id);
       x.trials.

   get_trials(SUBJECT_ID, 'include_missing')
       Same as above, but if there are any trials marked as "missing" or
       "bad" in the _info.txt file (with -1 as the start and end frame),
       include those lines in the output.  Normally these lines are
       filtered out because they are not useful unless you really care
       about trial numbers.  See also list_missing_trials.

 Not all subjects in the same experiment necessarily have the same number
 of trials due to fussy kids and bad data.  See also: LIST_MISSING_TRIALS

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [ trials ] = get_trials( subject_id , param)
0002 %Finds the frame numbers of the starts and ends of the trials
0003 %   get_trials(SUBJECT_ID)
0004 %       Convenience function, equivalent to x = get_timing(subject_id);
0005 %       x.trials.
0006 %
0007 %   get_trials(SUBJECT_ID, 'include_missing')
0008 %       Same as above, but if there are any trials marked as "missing" or
0009 %       "bad" in the _info.txt file (with -1 as the start and end frame),
0010 %       include those lines in the output.  Normally these lines are
0011 %       filtered out because they are not useful unless you really care
0012 %       about trial numbers.  See also list_missing_trials.
0013 %
0014 % Not all subjects in the same experiment necessarily have the same number
0015 % of trials due to fussy kids and bad data.  See also: LIST_MISSING_TRIALS
0016 
0017 
0018 
0019 
0020 if ( exist('param', 'var') && strcmp(param, 'include_missing') )
0021     timing = get_timing(subject_id, param);
0022 else
0023     timing = get_timing(subject_id);
0024 end
0025 
0026 trials = timing.trials;
0027 
0028 end
0029 
0030

Generated on Tue 23-May-2017 03:00:58 by m2html © 2005