nisp_exppdf — Computes the Exponential PDF.
p = nisp_exppdf ( x ) p = nisp_exppdf ( x , lambda )
a matrix of doubles
a matrix of doubles (default lambda = 1). Must be positive.
a matrix of doubles, the probability
This function computes the Exponential PDF.
Any scalar input argument is expanded to a matrix of doubles of the same size as the other input arguments.
Any optional input argument equal to the empty matrix will be set to its default value.
The exponential distribution with rate lambda has density
for x >= 0.
TODO : improve implementation (check inf, nan, etc...)
// http://en.wikipedia.org/wiki/Exponential_distribution scf(); x = linspace(0,5,1000); p = nisp_exppdf ( x , 0.5 ); plot(x,p, "r-" ); p = nisp_exppdf ( x , 1 ); plot(x,p, "m-" ); p = nisp_exppdf ( x , 1.5 ); plot(x,p, "c-" ); xtitle("Exponential Probability Distribution Function","X","P(X)"); legend(["lambda=0.5","lambda=","lambda=1.5"]);