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

cevent_value_at_time

PURPOSE ^

Returns 0 or more values that are valid at the given timestamp

SYNOPSIS ^

function values = cevent_value_at_time(cevent, timestamp)

DESCRIPTION ^

 Returns 0 or more values that are valid at the given timestamp

 [values] =  cevent_value_at_time(cevent, timestamp)

 Looks in the given cevent for any events that contain the given
 timestamp.  Returns the values for each of those events, if there are
 any.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function values = cevent_value_at_time(cevent, timestamp)
0002 % Returns 0 or more values that are valid at the given timestamp
0003 %
0004 % [values] =  cevent_value_at_time(cevent, timestamp)
0005 %
0006 % Looks in the given cevent for any events that contain the given
0007 % timestamp.  Returns the values for each of those events, if there are
0008 % any.
0009 %
0010 
0011 match = (cevent(:, 1) <= timestamp) & (cevent(:, 2) > timestamp);
0012 
0013 values = cevent(match, 3);

Generated on Wed 24-May-2017 00:00:56 by m2html © 2005