Home > data-analysis > manip > cevent > get_cevent_opposite.m

get_cevent_opposite

PURPOSE ^

This function get the durations that are not within the cevent ranges but

SYNOPSIS ^

function event_out = get_cevent_opposite(sub_id, cevent_data, trial_times)

DESCRIPTION ^

 This function get the durations that are not within the cevent ranges but
 still within trials, return as events. The input data can have
 overlapping events.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function event_out = get_cevent_opposite(sub_id, cevent_data, trial_times)
0002 
0003 % This function get the durations that are not within the cevent ranges but
0004 % still within trials, return as events. The input data can have
0005 % overlapping events.
0006 
0007 if ~exist('trial_times', 'var')
0008     trial_times = get_trial_times(sub_id);
0009 end
0010 
0011 cstream_data = cevent2cstream(cevent_data, trial_times(1,1), 0.01, 0, trial_times(end, 2));
0012 
0013 tmp = cstream2cevent(cstream_data, 0.02, 1);
0014 tmp = tmp(tmp(:,3) < 0.1, 1:2);
0015 
0016 tmp = event_extract_ranges(tmp, trial_times);
0017 event_out = vertcat(tmp{:});

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