Gamma function
From Script | Spoken-Tutorial
The gamma function is defined by :
<math>\Gamma(n)=\int_0^\infty e^{-x}x^{n-1}dx</math>
in scilab gamma(n) evaluates the gamma function at all the elements of n.
e.g.
-->gamma(1) ans = 1. -->gamma(0) ans = Inf
For n positive integer <math>\Gamma(n+1)=n!</math>
i.e.
-->gamma(5) ans = 24. -->gamma(4) ans = 6.
Similarly we can check gamma function for fractions also.
e.g.
-->gamma(11/2) ans = 52.342778 -->gamma(-11/2) ans = 0.0109127
One important property of gamma function is:
-->gamma(1/2) ans = 1.7724539