Cody

Problem 2581. Sum of series VII

Solution 1206094

Submitted on 6 Jun 2017 by Said BOUREZG
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
n = 1;m=1; s_correct = 1/2; assert(isequal(sumOfSeriesVII(n,m),s_correct))

ans = 0.5000

2   Pass
n = 1;m=2; s_correct = 1/3; assert(abs(sumOfSeriesVII(n,m)-s_correct)<eps)

ans = 0.3333

3   Pass
n = 3;m=3; s_correct = 0.3875; assert(abs(sumOfSeriesVII(n,m)-s_correct)<eps)

ans = 0.1250 ans = 0.2750 ans = 0.3875

4   Pass
n = 10;m=3; s_correct = 0.499971551885614; assert(abs(sumOfSeriesVII(n,m)-s_correct)<10*eps)

ans = 0.1250 ans = 0.2750 ans = 0.3875 ans = 0.4518 ans = 0.4819 ans = 0.4940 ans = 0.4982 ans = 0.4995 ans = 0.4999 ans = 0.5000

Suggested Problems

More from this Author9

Community Treasure Hunt

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

Start Hunting!