The incomplete gamma function.
y = specfun_gammainc ( x , a ) y = specfun_gammainc ( x , a , tail )
a matrix of doubles, the upper limit of integration of the gamma density. Must be real (not complex) and nonnegative.
a matrix of doubles, the shape parameter of the gamma density. Must be real (not complex) and nonnegative.
a 1 x 1 matrix of strings, the tail of the CDF function, "upper" or "lower" (default tail="lower"). Set tail="lower" to get the probability from the CDF gamma distribution function, set tail="upper" to get the complementary probability, that is q = 1-p.
a matrix of doubles, the incomplete gamma function.
Returns the incomplete gamma function. If tail="lower", the function definition is:
The tail option may be used to overcome the limitation of floating point arithmetic. If tail="upper", the function definition is:
We may use tail="upper" when the output of the gamminc function with tail="lower" is very close to 1.
If any of the input arguments a or x is a 1-by-1 matrix while the other one is a m-by-n matrix, then the 1-by-1 matrix is expanded to m-by-n. If the sizes of the two arguments do not match, we generate an error.
If a=0 and tail=="lower", we return y=1, whatever the value of x. If a=0 and tail=="upper", we return y=0, whatever the value of x.