Cody

Solution 1980587

Submitted on 17 Oct 2019 by Nikolaos Nikolaou
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 = 1; b = 2; c = 1; y_correct = [-1 -1]; assert(sum(abs(roots(a,b,c)-y_correct))<1e-3)

y = -1 -1

2   Pass
a = 9; b = 42; c = 5; y_correct = [-4.5444 -0.1223]; assert(sum(abs(roots(a,b,c)-y_correct))<1e-3)

y = -4.5444 -0.1223

3   Pass
a = 10; b = 42; c = 7; y_correct = [-4.0261 -0.1739]; assert(sum(abs(roots(a,b,c)-y_correct))<1e-3)

y = -4.0261 -0.1739