Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
n = 5;
y_correct = [1 0 1 0 1];
assert(isequal(alternating10(n),y_correct))
a =
1 0 1 0 1 0 1 0 1 0
y =
1 0 1 0 1
|
2 | Pass |
n = 8;
y_correct = [1 0 1 0 1 0 1 0];
assert(isequal(alternating10(n),y_correct))
a =
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
y =
1 0 1 0 1 0 1 0
|
19335 Solvers
2261 Solvers
546 Solvers
323 Solvers
262 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!