function retval = TimeFilter(Events,t0,t1)
% usage: retval = TimeFilter(Events,t0,t1)
% description: returns array of events between t0 and t1 in Events

[m,n] = size(Events);
retval = zeros(m,n);
ndx = 1;
for ii = 1:m
    if (Events(ii,3)>=t0 & Events(ii,3)<=t1)
        retval(ndx,:) = Events(ii,:);
        ndx = ndx+1;
    end
end
retval = retval(1:ndx-1,:);
