Make N samples from a truncated exponential distribution with the density function r0exp(r0t). The rate r0 can be positive (growth) or negative (decay). The density function is normalized to integrate to 1 on the interval tau_min to tau_max.

sample_trunc_exp(N, r0, tau_min, tau_max)

Arguments

N

The number of samples to make

r0

The rate parameter

tau_min

The lower limit for truncation

tau_max

The upper limit for truncation

Value

A vector of N samples between tau_min and tau_max