Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
a=1; b=3; c=3; d=1;
y_correct = [-1 -1 -1];
assert(sum(abs(cubicRoots(a,b,c,d)-y_correct))<1e-3)
|
2 | Pass |
a=1; b=-6; c=11; d=-6;
y_correct = [1 2 3];
assert(sum(abs(cubicRoots(a,b,c,d)-y_correct))<1e-3)
|
3 | Pass |
a=4; b=4; c=-1; d=-1;
y_correct = [-1 -0.5 0.5];
assert(sum(abs(cubicRoots(a,b,c,d)-y_correct))<1e-3)
|
6063 Solvers
819 Solvers
753 Solvers
Return elements unique to either input
550 Solvers
185 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!