Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = [1 2 3;4 5 6;7 8 9];
y_correct = [1 3 5 7 9 8 6 4 2]'
assert(isequal(vectorizeit(x),y_correct))
y_correct =
1
3
5
7
9
8
6
4
2
|
2 | Pass |
x = [5 8 9 ;7 22 9];
y_correct = [5 7 9 22 8]'
assert(isequal(vectorizeit(x),y_correct))
y_correct =
5
7
9
22
8
|
3 | Pass |
x = [88 99; 0 64];
y_correct = [99 88 64 0]'
assert(isequal(vectorizeit(x),y_correct))
y_correct =
99
88
64
0
|
4 | Pass |
x = [0 0; 1 1];
y_correct = [1 0]'
assert(isequal(vectorizeit(x),y_correct))
y_correct =
1
0
|
173 Solvers
196 Solvers
We love vectorized solutions. Problem 1 : remove the row average.
381 Solvers
145 Solvers
81 Solvers