4.2

4.2 | 5 ratings Rate this file 18 Downloads (last 30 days) File Size: 52.02 KB File ID: #5616

Generalized Hypergeometric Function

by Ben Barrowes

 

02 Aug 2004 (Updated 06 Jan 2005)

Calculates the Generalized Hypergeometric Function at the desired accuracy.

| Watch this File

File Information
Description

A numerical evaluator for the generalized hypergeometric function for complex arguments with large magnitudes using a direct summation of the Gauss series.

pFq isdefined by (borrowed from Maple):
 pFq = sum(z^k / k! * product(pochhammer(n[i], k), i=1..p) / product(pochhammer(d[j], k), j=1..q), k=0..infinity )

The desired accuracy (number of digits) can be specified as a parameter.

This function is a translation from the original fortran77 source code written by W. F. Perger from the Michigan Technological University.

Acknowledgements
This submission has inspired the following:
Generalized Hypergeometric Function (vectorized)
MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (6)
05 Jan 2005 Wang Xudong

Why the program does not operate with Matlab 6.5 ? It occurs some errors as follow--- ??? Error: File: D:\MATLAB6p5p1\stbc\genHyper.m Line: 332 Column: 15
Expected a variable, function, or constant, found ")".I think it may be the "bits()", I don't know how to deal with it.

18 Apr 2005 Matt Nunes  
23 Oct 2006 Jia Chen

Very good code!

13 Sep 2007 Huynh Hieu

It is good. But do you do about Meijer G function? Could you help me? Thank

06 Oct 2007 tassaddaq hussain

it is fair software and fullfill my requirement to a great extent

04 Aug 2008 James B

In general, this function works just fine. However, a word of warning. If you plan on executing the function more than 8,192 times in any given MATLAB session, you will need to either a) run MATLAB -nojvm from Cygwin, or comment out ALL of the write statements in the Fortran code. Evidently all of these write statements fill up some kind of buffer in the desktop implementation that is bypassed when you run MATLAB from Cygwin. This behavior is present in 2007a Student Version and 2008a full version. I compiled the code using MINGW and the GNUMEX kit.

Other issues include the STOP statements in the code that will cause MATLAB to exit erroneously. I had to replace all of the STOP statements with the appropriate MATLAB MEX error statement.

Please login to add a comment or rating.
Updates
05 Oct 2004

Updating so works with MATLAB < 7.0.
bits calls => bits() in two places.

Also including a mex function which does the same thing but much faster.

06 Jan 2005

Fixed backward compatibility problem.

Tag Activity for this File
Tag Applied By Date/Time
generalized hypergeometric function Ben Barrowes 22 Oct 2008 07:28:55
complex Ben Barrowes 22 Oct 2008 07:28:55
magnitudes Ben Barrowes 22 Oct 2008 07:28:55
summation Ben Barrowes 22 Oct 2008 07:28:55
generalized hypergeometric function Chrsitophe Le Martret 27 Oct 2008 10:33:37
generalized hypergeometric function Luis 19 Jul 2010 10:18:20
generalized hypergeometric function BATOOL 05 Jul 2011 18:57:09
generalized hypergeometric function Martin Taranetz 24 Nov 2011 04:51:43

Contact us at files@mathworks.com