Cody

# Problem 46043. Evaluate the generalized hypergeometric function

Solution 2689355

Submitted on 13 Jul 2020 by Tim
• Size: 51
• This is the leading solution.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
a = []; b = []; z = 1; pFq_correct = exp(z); assert(abs(pFq(a,b,z)-pFq_correct)/pFq_correct < 1e-8)

2   Pass
a = []; b = 1/2; x = pi/4; z = -x^2/4; pFq_correct = 1/sqrt(2); assert(abs(pFq(a,b,z)-pFq_correct)/pFq_correct < 1e-8)

3   Pass
a = []; b = 1; x = 1; z = -x^2/4; pFq_correct = besselj(0,x); assert(abs(pFq(a,b,z)-pFq_correct)/pFq_correct < 1e-8)

4   Pass
a = 2; b = []; z = 1/2; pFq_correct = 4; assert(abs(pFq(a,b,z)-pFq_correct)/pFq_correct < 1e-8)

5   Pass
a = 1; b = 2; z = 3; pFq_correct = (exp(3)-1)/3; assert(abs(pFq(a,b,z)-pFq_correct)/pFq_correct < 1e-8)

6   Pass
a = [1 2]; b = 4; z = 0.2; pFq_correct = 1.113869211474147; assert(abs(pFq(a,b,z)-pFq_correct)/pFq_correct < 1e-8)

7   Pass
a = [1 1]; b = 2; z = rand; pFq_correct = -log(1-z)/z; assert(abs(pFq(a,b,z)-pFq_correct)/pFq_correct < 1e-8)

### Community Treasure Hunt

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

Start Hunting!