I have an array of time variables
t(1), t(2), ..., t(n). and corresponding variables
v(1), v(2), ..., v(n). Given a time
tx, I would like to efficiently find between which interval
(t(i), t(i+1)] does the number lie. Correspondingly, the variable
vx needs to be interpolated which can be done easily afterwards.
P.S: The time
t(i=1) is initialized with
t1 and is always increasing and greater than zero.