Statistics Toolbox    
gaminv

Inverse of the gamma cumulative distribution function (cdf)

Syntax

Description

X = gaminv(P,A,B) computes the inverse of the gamma cdf with parameters A and B for the corresponding probabilities in P. Vector or matrix inputs for P, A, and B must all be the same size. A scalar input is expanded to a constant matrix with the same dimensions as the other inputs. The parameters in A and B must all be positive, and the values in P must lie on the interval [0 1].

The gamma inverse function in terms of the gamma cdf is

where

Algorithm

There is no known analytical solution to the integral equation above. gaminv uses an iterative approach (Newton's method) to converge on the solution.

Examples

This example shows the relationship between the gamma cdf and its inverse function.

See Also

gamcdf, gamfit, gamlike, gampdf, gamrnd, gamstat, icdf


  gamfit gamlike