File Exchange

image thumbnail

Gaussian Hypergeometric Function

version 1.0 (1.25 KB) by

Computes gaussian hypergeometric function using a series expansion.

4 Downloads

Updated

No License

HYPERGEOMETRIC2F1 Computes a hypergeometric function using the series expansion:

f(a,b;c;x)=
1 + [ab/1!c]x + [a(a+1)b(b+1)/2!c(c+1)]x^2 +[a(a+1)(a+2)b(b+1)(b+2)/3!c(c+1)(c+2)]x^3 + ...

This function solves the Gaussian Hypergeometric Differential Equation:

x(1-x)y'' + {c-(a+b+1)x}y' - aby = 0

Comments and Ratings (4)

David Holdaway

David Holdaway (view profile)

It's pretty good if you want to calculate the Hypergeometric series for values at which it terminates after a finite number of terms. If you want non finite series (which is usually the case) this will converge slowly, needs patching with methods for large x etc.

Hung tran

thanh

Bryan Reed

Does a good job at small x, but by the way it's calculated is useless as x gets close to 1. Should switch to a different functional form for arguments in the upper half of the range. Would be more efficient and trustworthy, also, if it automatically determined when to truncate the series to get the desired accuracy.

albert muthumalai

MATLAB Release
MATLAB 6.1 (R12.1)
Acknowledgements

Inspired: Generation of Random Variates

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video