Contents Previous Next Subchapters

The Gamma Function
Syntax gamma(x)
See Also gammln , gammainc , factorl

Returns the element-by-element gamma function, where x is a an integer, real, double-precision, or complex matrix such that the real part of each element of x is greater than 0. The return value has the same dimension as x. If x is integer, the return value is double-precision, otherwise it has the same type as x.

Gamma Function
The gamma function is defined by
                /   - t  (x - 1)
     gamma(x) = |  e    t       dt
You can use integration by parts to note that if x is equal to an integer greater than zero,
     gamma(x) = (x - 1) !

If you enter
     x = seq(4)
O-Matrix will reply