MATLAB Function Reference | ![]() ![]() |
表示
Y = gamma(A) ガンマ関数 Y = gammainc(X,A) 不完全ガンマ関数 Y = gammaln(A) ガンマ関数の対数
定義
gamma(n+1) = n! = prod(1:n)
詳細
Y = gamma(A)
は、A
の要素に対するガンマ関数を出力します。A
は、実数でなければなりません。
Y = gammainc(X,A)
は、X
と A
の対応する要素の不完全ガンマ関数を出力します。引数 X
、および、A
は実数で、同じサイズ(あるいは、どちらかがスカラ)でなければなりません。
Y = gammaln(A)
は、ガンマ関数の対数 gammaln(A) = log(gamma(A))
を出力します。コマンド gammaln
は、log(gamma(A))
を使って直接に計算するときに発生するかもしれないアンダーフローとオーバフローを回避します。
アルゴリズム
gamma
、および、gammaln
の計算は、参考文献[1] に書かれているアルゴリズムに基づいています。A
の値に応じて、様々なミニマックス有理数近似が使われます。不完全ガンマ関数の計算は、参考文献[2] のアルゴリズムに基づいています。
参考文献
Cody, J., An Overview of Software Development for Special Functions, Lecture 注意s in Mathematics, 506, Numerical Analysis Dundee, G. A. Watson (ed.), Springer Verlag, Berlin, 1976.
Abramowitz, M. and I.A. Stegun, Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series #55, Dover Publications, 1965, sec. 6.5.
![]() | gallery | gca | ![]() |