(See the definition at the Wikipedia link)
The numbers p and q are the numbers of values a and b in the numerator and denominator (respectively), and the Pochhammer symbol (a)_n is defined by
(a)_n = a*(a+1)*(a+2)...(a+n-1)
Many other functions can be expressed in terms of the generalized hypergeometric function. For example,
exp(x) = pFq([],[],x)
cos(x0 = pFq([],1/2,-x^2/4)
besselj(0,x) = pFq([],1,-x^2/4)
where the dash means that the list of parameters is empty. The generalized hypergeometric function can be computed with hypergeom from the Symbolic Math Toolbox, but it is not available in Cody or basic MATLAB.
Write a function to evaluate the generalized hypergeometric function.

Solution Stats

17 Solutions

7 Solvers

Last Solution submitted on May 24, 2026

Last 200 Solutions

Solution Comments

Show comments
Loading...

Problem Recent Solvers7

Suggested Problems

More from this Author324

Community Treasure Hunt

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

Start Hunting!