Home > data-analysis > manip > event > event_XOR.m

event_XOR

PURPOSE ^

event_XOR returns the times when exactly one of event1 or event2 is active.

SYNOPSIS ^

function res = event_XOR(event1, event2)

DESCRIPTION ^

event_XOR returns the times when exactly one of event1 or event2 is active.
  to be modified --- the whole set should be set explicitly

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function res = event_XOR(event1, event2)
0002 %event_XOR returns the times when exactly one of event1 or event2 is active.
0003 %  to be modified --- the whole set should be set explicitly
0004 %
0005 et_and = event_AND(event1, event2);
0006 et_or  = event_OR(event1, event2);
0007 minTime = et_or(1,1);
0008 maxTime = et_or(event_number(et_or),2);
0009 res = event_AND(event_NOT(et_and,[minTime maxTime]), et_or);

Generated on Tue 23-May-2017 02:00:59 by m2html © 2005