This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = [1 2 3];
y_correct = [1 2 4];
assert(isequal(incrementor(x),y_correct))
a =
[]
a =
1
a =
12
a =
123
a =
124
b =
[]
b =
1
b =
1 2
b =
1 2 4
|
2 | Pass |
%%
x = [1 9 1 9];
y_correct = [1 9 2 0];
assert(isequal(incrementor(x),y_correct))
a =
[]
a =
1
a =
19
a =
191
a =
1919
a =
1920
b =
[]
b =
1
b =
1 9
b =
1 9 2
b =
1 9 2 0
|
3 | Pass |
%%
x = [9 9 9];
y_correct = [1 0 0 0];
assert(isequal(incrementor(x),y_correct))
a =
[]
a =
9
a =
99
a =
999
a =
1000
b =
[]
b =
1
b =
1 0
b =
1 0 0
b =
1 0 0 0
|
Remove any row in which a NaN appears
5979 Solvers
Convert a vector into a number
442 Solvers
179 Solvers
convert matrix to single column
217 Solvers
1245 Solvers