function X = exp_inv(P,muX)
% X = exp_cdf(P,muX)
% return the inverse CDF of the exponential distribution with mean muX,
% corresponding to a non-exceedence probability P
%
%    Reference: http://en.wikipedia.org/wiki/Exponential_distribution

  idx = find(P<0); P(idx) = 0.00;
  idx = find(P>1); P(idx) = 1.00;

  X = -muX * log(1-P);

% ----------------------------------------------------------------- exp_inv
