Cody

Solution 1067869

Submitted on 1 Dec 2016
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
a=1; b=2; c=1; t=3; s=15; y=SolveEquation(a,b,c,t,s) y_correct = [ 0.5700 , -2.5700] tolerance = 1e-4; assert(abs(y(1)-y_correct(1))<tolerance) assert(abs(y(2)-y_correct(2))<tolerance)

x1 = 0.5700 x2 = -2.5700 y = 0.5700 -2.5700

Output argument "x" (and maybe others) not assigned during call to "SolveEquation". Error in TestPoint1 (line 6) y=SolveEquation(a,b,c,t,s)

2   Fail
a=1; b=2; c=2; t=exp(1); s=exp(1); y=SolveEquation(a,b,c,t,s) y_correct = [ -1 , -1] tolerance = 1e-4; assert(abs(y(1)-y_correct(1))<tolerance) assert(abs(y(2)-y_correct(2))<tolerance)

x1 = -1 x2 = -1 y = -1 -1

Output argument "x" (and maybe others) not assigned during call to "SolveEquation". Error in TestPoint2 (line 6) y=SolveEquation(a,b,c,t,s)