Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = [1 2 3 4 5 6 7];
y_correct = [1 1 2 2 3 3 4 4 5 5 6 6 7 7];
assert(isequal(RepeatComponenets(x),y_correct))
y =
1 1 2 2 3 3 4 4 5 5 6 6 7 7
|
2 | Pass |
%%
x = [0 1 5 6 -7 0 9 6];
y_correct = [0 0 1 1 5 5 6 6 -7 -7 0 0 9 9 6 6];
assert(isequal(RepeatComponenets(x),y_correct))
y =
0 0 1 1 5 5 6 6 -7 -7 0 0 9 9 6 6
|
1223 Solvers
254 Solvers
95 Solvers
Replace every 3rd element in a vector with 4
170 Solvers
Compute LOG(1+X) in natural log
204 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!