Cody

# Problem 44845. Just another sum (JAS)

Solution 1721999

Submitted on 6 Feb 2019
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   Fail
x = 1; y_correct = refsol(x); assert(abs(sol(x)-y_correct)<1e-6)

Undefined function 'refsol' for input arguments of type 'double'. Error in Test1 (line 2) y_correct = refsol(x);

2   Fail
x = 1:10; y_correct = refsol(x); assert(abs(sol(x)-y_correct)<1e-6)

Undefined function 'refsol' for input arguments of type 'double'. Error in Test2 (line 2) y_correct = refsol(x);

3   Fail
x = 2.^(1:10); y_correct = refsol(x); assert(abs(sol(x)-y_correct)<1e-6)

Undefined function 'refsol' for input arguments of type 'double'. Error in Test3 (line 2) y_correct = refsol(x);

4   Fail
x = (1:10).^2; y_correct = refsol(x); assert(abs(sol(x)-y_correct)<1e-6)

Undefined function 'refsol' for input arguments of type 'double'. Error in Test4 (line 2) y_correct = refsol(x);

5   Fail
x = randi(20,1,20); y_correct = refsol(x); assert(abs(sol(x)-y_correct)<1e-6)

Undefined function 'refsol' for input arguments of type 'double'. Error in Test5 (line 2) y_correct = refsol(x);

6   Fail
x = rand(1,20)-0.5; y_correct = refsol(x); assert(abs(sol(x)-y_correct)<1e-6)

Undefined function 'refsol' for input arguments of type 'double'. Error in Test6 (line 2) y_correct = refsol(x);

7   Fail
x = rand(1,100)-0.5; y_correct = refsol(x); assert(abs(sol(x)-y_correct)<1e-6)

Undefined function 'refsol' for input arguments of type 'double'. Error in Test7 (line 2) y_correct = refsol(x);