This works in R2012b, but not on cody
function ans = duplicate(x)
[x;x];
x(:)';
end
Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
%%
x = [2,3,5];
y_correct = [2,2,3,3,5,5];
assert(isequal(duplicate(x),y_correct))
Error: Assertion failed.
|
2197 Solvers
192 Solvers
Back to basics 18 - justification
176 Solvers
464 Solvers
272 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!