Find time points that event signal goes under 'status' value ix = vb_event_start(y,status) y : event signal status : status value ix : index corresponding to the point 'y' goes under 'status' value 2009-6-11 Masa-aki Sato Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function ix = vb_trigger_end(y,status) 0002 % Find time points that event signal goes under 'status' value 0003 % ix = vb_event_start(y,status) 0004 % y : event signal 0005 % status : status value 0006 % ix : index corresponding to the point 0007 % 'y' goes under 'status' value 0008 % 0009 % 0010 % 2009-6-11 Masa-aki Sato 0011 % 0012 % Copyright (C) 2011, ATR All Rights Reserved. 0013 % License : New BSD License(see VBMEG_LICENSE.txt) 0014 0015 T = length(y); 0016 ix = find( y(2:T) <= status & y(1:T-1) > status);