MATLAB: Is there any way to speed up the calculation of the confluent hypergeometric function

confluent hypergeometric functionhypergeomincrease speed

Hello Friends, Matlab's hypergeom function is too slow for my model calibration. Is there any other function to use or other way to increases the speed ?
Thank you

Best Answer

"It is very tempting to write your own code for Gauss's hypergeometric
function 2F1(a;b;c;z). The definition is just a power series. But
any code that implements the definition using floating point arithmetic
is bound to have terrible numeric properties for large argument.
For example, hypergeom([],[],z) is equal to exp(z) and using the
power series alone to compute exp(z) is well known to be a bad idea.
MATLAB can't do a general hypergeom reliably using only floating
point so we have Maple do it for us, using arithmetic with as many
digits as necessary to get accurate answers.
I would be very suspicious of anybody who claims to have fast code
for hypergeometric series.
-- Cleve
moler@mathworks.com "
Related Question