Exponential PDF
y = distfun_exppdf ( x , mu )
a matrix of doubles
a matrix of doubles, the average. mu>0
a matrix of doubles, the density
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 average mu has density
for x >= 0 and is zero if x<0.
Compatibility note.
Notice that mu, the average, is the inverse of the rate. Other computing languages (including R), use 1/mu as the parameter of the exponential distribution. The calling sequence
distfun_exppdf(x,mu)
corresponds to the R calling sequence:
dexp(x,1/mu)
// http://en.wikipedia.org/wiki/Exponential_distribution scf(); x = linspace(0,5,1000); y = distfun_exppdf ( x , 2 ); plot(x,y, "r-" ); y = distfun_exppdf ( x , 1 ); plot(x,y, "m-" ); y = distfun_exppdf ( x , 2/3 ); plot(x,y, "c-" ); xtitle("Exponential PDF","x","y"); legend(["mu=2","mu=1","mu=2/3"]); // For negative inputs, the probability is // zero distfun_exppdf(-10,2) | ![]() | ![]() |
Wikipedia, Exponential distribution function, http://en.wikipedia.org/wiki/Exponential_distribution