I have an array that looks like the following:
exampleArray = {{t1,r1},{t2,r2},{t3,r3},{t4,r4},{t5,r5},...};
Where each pair of real numbers $(t_k,r_k)$ represents some "event" (independent of all other events) starting at time $t_k$ and ending at time $r_k$. Provided some time $t_i$ and exampleArray
, I'd like to quickly return the number of "events" at this time. I'd also like to quickly plot the number of events versus time over some interval. The catch is that exampleArray
might have a very large number of elements, so we wouldn't want to scan through it multiple times.
Is there an elegant way to do this in Mathematica?