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.
|
Back to basics 3 - Temp Directory
328 Solvers
Back to basics 22 - Rotate a matrix
763 Solvers
3070 Solvers
Rounding off numbers to n decimals
1050 Solvers
241 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!