Statistics: hninv

### Function Reference: `hninv`

statistics: x = hninv (p, mu, sigma)

Inverse of the half-normal cumulative distribution function (iCDF).

For each element of p, compute the quantile (the inverse of the CDF) of the half-normal distribution with location parameter mu and scale parameter sigma. 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.

Further information about the half-normal distribution can be found at https://en.wikipedia.org/wiki/Half-normal_distribution

See also: hncdf, hnpdf, hnrnd, hnfit, hnlike

Source Code: hninv

### Example: 1

     ## Plot various iCDFs from the half-normal distribution
     p = 0.001:0.001:0.999;
     x1 = hninv (p, 0, 1);
     x2 = hninv (p, 0, 2);
     x3 = hninv (p, 0, 3);
     x4 = hninv (p, 0, 5);
     plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c")
     grid on
     ylim ([0, 10])
     legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ...
              "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "northwest")
     title ("Half-normal iCDF")
     xlabel ("probability")
     ylabel ("x")