Home > data-access > get_variable_by_trial_cat.m

get_variable_by_trial_cat

PURPOSE ^

SYNOPSIS ^

function rez = get_variable_by_trial_cat(subid, var, trialcol)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function rez = get_variable_by_trial_cat(subid, var, trialcol)
0002 
0003 if ~exist('trialcol', 'var')
0004     trialcol = 0;
0005 end
0006 
0007 if has_variable(subid, var)
0008     rez = get_variable_by_trial(subid, var);
0009     if trialcol
0010         for r = 1:numel(rez)
0011             tt = get_variable(subid, 'cevent_trials');
0012             rez{r}(:,end+1) = tt(r,3);
0013         end
0014     end
0015     rez = vertcat(rez{:});
0016 else
0017     rez = [];
0018 end
0019 
0020 end

Generated on Tue 23-May-2017 20:00:55 by m2html © 2005