logninv
Inverse of the log-normal cumulative distribution function (iCDF).
For each element of p, compute the quantile (the inverse of the CDF) of the log-normal distribution with mean mu and standard deviation sigma corresponding to the associated normal distribution. The size of x is the common size of p, mu, and sigma. A scalar input functions as a constant matrix of the same size as the other inputs.
If a random variable follows this distribution, its logarithm is normally distributed with mean mu and standard deviation sigma.
Default parameter values are mu = 0
and
sigma = 1
. Both parameters must be reals and
sigma > 0
. For sigma <= 0
, NaN
is
returned.
Further information about the log-normal distribution can be found at https://en.wikipedia.org/wiki/Log-normal_distribution
See also: logncdf, lognpdf, lognrnd, lognfit, lognlike, lognstat
Source Code: logninv
## Plot various iCDFs from the log-normal distribution p = 0.001:0.001:0.999; x1 = logninv (p, 0, 1); x2 = logninv (p, 0, 0.5); x3 = logninv (p, 0, 0.25); plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") grid on ylim ([0, 3]) legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... "location", "northwest") title ("Log-normal iCDF") xlabel ("probability") ylabel ("values in x") |