This solution is outdated. To rescore this solution, sign in.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = [1 2 3 4 5];
n=2;
y_correct = [1 0 0 2 0 0 3 0 0 4 0 0 5 0 0];
assert(isequal(insert_zeros(x,n),y_correct))
|
2 | Pass |
%%
x = [1 2 3 4 5];
n=1;
y_correct = [1 0 2 0 3 0 4 0 5 0 ];
assert(isequal(insert_zeros(x,n),y_correct))
|
3 | Pass |
%%
x = [1 2];
n=5;
y_correct = [1 0 0 0 0 0 2 0 0 0 0 0];
assert(isequal(insert_zeros(x,n),y_correct))
|
given 3 sides, find area of this triangle
680 Solvers
Is my wife right? Now with even more wrong husband
1241 Solvers
Back to basics 25 - Valid variable names
293 Solvers
277 Solvers
405 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!