Hypergeometric Function in Matlab
2 ビュー (過去 30 日間)
古いコメントを表示
Can somebody help me to write the hypergeometric fucntion in code form?
採用された回答
David Goodmanson
2020 年 6 月 1 日
Hello PM,
The variable l does not come out so well in this font so I'll call it q instead. SInce both -q and -n are negative, the series terminates and is a polynomial. The function 2F0(z) is defined as
Sum{j} (gamma(j-q)*gamma(j-n) / ( gamma(-q)*gamma(-n)*j! ) *z^j
and with the important identity
gamma(j-q) / gamma(-q) = q! / (q-j)! * (-)^j [using ! does something funky to the type color]
you can arrive at
Sum{j} (factorial(q)*factorial(n)) / (factorial(q-j)*factorial(n-j)*factorial(j)) * (1/c).^j
The last term in the series occurs when either q-j is zero or n-j is zero, whichever comes first. So you can put this expression into a for loop in j, which runs from j = 0 to j = min(q,n).
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!