Generates a vector of exponential random variables with the specified parameter. The general syntax for its use is
y = randexp(lambda)
where lambda
is a vector containing the parameters for
the generated random variables.
The exponential random variable is usually associated with the waiting time between events in a Poisson random process. The PDF of an exponential random variable is:
Here is an example of using the randexp
function to generate
some exponentially distributed random variables
--> randexp(ones(1,6)) ans = <float> - size: [1 6] Columns 1 to 3 0.98798931 0.99071515 0.79986471 Columns 4 to 6 0.13242233 0.64143968 0.99512565