Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
n=4
x=[2 1 2 3 4 5 -3 4 -1 2 2 2]
y_correct = [2 0 0 0 1 0 0 0 2 0 0 0 3 0 0 0 4 0 0 0 5 0 0 0 -3 0 0 0 4 0 0 0 -1 0 0 0 2 0 0 0 2 0 0 0 2];
assert(isequal(time_expansion(x,n),y_correct))
n =
4
x =
2 1 2 3 4 5 -3 4 -1 2 2 2
|
2 | Pass |
%%
n=1
x=[2 1 2 3 4 5 -3 4 -1 2 2 2]
y_correct=x;
assert(isequal(time_expansion(x,n),y_correct))
n =
1
x =
2 1 2 3 4 5 -3 4 -1 2 2 2
|
3 | Pass |
%%
n=5
x=[2 1 2 3 4]
y_correct=[2 0 0 0 0 1 0 0 0 0 2 0 0 0 0 3 0 0 0 0 4];
assert(isequal(time_expansion(x,n),y_correct))
n =
5
x =
2 1 2 3 4
|
4 | Pass |
%%
|
797 Solvers
MATCH THE STRINGS (2 CHAR) very easy
194 Solvers
Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)
121 Solvers
276 Solvers
730 Solvers