Problem 46043. Evaluate the generalized hypergeometric function

(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

33.33% Correct | 66.67% Incorrect
Last Solution submitted on Oct 26, 2022

Solution Comments

Show comments

Problem Recent Solvers5

Suggested Problems

More from this Author281

Community Treasure Hunt

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

Start Hunting!