Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = [1 2 3 4 5]
n = 4
y_correct = [1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5]
assert(isequal(NplicateMe(x,n),y_correct))
x =
1 2 3 4 5
n =
4
y_correct =
1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5
y =
[]
y =
1 1 1 1
y =
1 1 1 1 2 2 2 2
y =
1 1 1 1 2 2 2 2 3 3 3 3
y =
1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4
y =
1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5
|
2 | Pass |
x = [10 7 8]
n = 2
y_correct = [10 10 7 7 8 8]
assert(isequal(NplicateMe(x,n),y_correct))
x =
10 7 8
n =
2
y_correct =
10 10 7 7 8 8
y =
[]
y =
10 10
y =
10 10 7 7
y =
10 10 7 7 8 8
|
12381 Solvers
9833 Solvers
228 Solvers
177 Solvers
214 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!