Gauss hypergeometric 2F1 function for complex argument.

3 次查看(过去 30 天)
I have wound myself up in the situation of having to evaluate the Gauss hypergeometric 2F1 function for complex argument (i believe always with with norm smaller than 1). The other parameters are very nice though and on the form a=1, b=1+k,c=2+k and k some real number. The input in is to be run through a maximiser.
Unfortunately hypergeom of Matlab is very slow, but also seems to give slightly unreliable results (it reduces for k=1/2 where I compared the results).
Do you know of any better implementation? e.g. using .mex (albeit I have never tried it before I will surely give it a show).
Thanks!
  2 个评论
Henrik Dam
Henrik Dam 2015-6-10
Hi. It looks very promising. I get an error when trying to mex the file though. I know next to nothing about this subject. I use mac. Do I need to do something else than download and install the Gfortran from https://gcc.gnu.org/wiki/GFortranBinaries#MacOS, install and write mex genHyper_mex.f90? It produces a lot similar errors, but an example is:
"Warning: Type mismatch in argument 'z' at (1); passed COMPLEX(4) to COMPLEX(8) "FolderPath"/genHyper_mex.f90:740:43: EXPON=EXPON+XL*DBLE(LOG(Z))-DBLE(FACTOR(CMPLX(XL,0.0)))"

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by