Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
n = 5;
y_correct = [1 -1 1 -1 1];
assert(isequal(alternating1_1(n),y_correct))
ans =
1 -1 1 -1 1
|
2 | Pass |
n = 8;
y_correct = [1 -1 1 -1 1 -1 1 -1];
assert(isequal(alternating1_1(n),y_correct))
ans =
1 -1 1 -1 1 -1 1 -1
|
1263 Solvers
Project Euler: Problem 2, Sum of even Fibonacci
835 Solvers
413 Solvers
167 Solvers
32 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!