Cody

Problem 47078. Sum of infinite series.

Solution 3382203

Submitted on 25 Oct 2020 by William
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
x = 1; n = -1; y_correct = 0.5; assert(abs(binomial(x,n)-y_correct)<1e-5)

2   Pass
x = 3; n = -1; y_correct = 0.25; assert(abs(binomial(x,n)-y_correct)<1e-5)

3   Pass
x = 3; n = -1; y_correct = 0.25; assert(abs(binomial(x,n)-y_correct)<1e-5)

4   Pass
x = 0; n = -3; y_correct = 1; assert(abs(binomial(x,n)-y_correct)<1e-5)

5   Pass
x = 3; n = -1; y_correct = 0.25; assert(abs(binomial(x,n)-y_correct)<1e-5)

6   Pass
x = 1; n = -2; y_correct = 0.25; assert(abs(binomial(x,n)-y_correct)<1e-5)

Suggested Problems

More from this Author5

Community Treasure Hunt

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

Start Hunting!