Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
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)
y =
0.5700
-2.5700
y_correct =
0.5700 -2.5700
|
2 | Pass |
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)
y =
-1
-1
y_correct =
-1 -1
|
2486 Solvers
1263 Solvers
404 Solvers
Project Euler: Problem 6, Natural numbers, squares and sums.
1018 Solvers
484 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!