Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = [];
y_correct = [];
assert(isequal(upAndDown(x),y_correct))
|
2 | Pass |
x = 0;
y_correct = [0;0];
assert(isequal(upAndDown(x),y_correct))
|
3 | Pass |
x = zeros(10);
x(7,4) = 1;
y_correct = zeros(20,10);
y_correct(10:11,4) = [1;1];
assert(isequal(upAndDown(x),y_correct))
|
4 | Pass |
x = [1 4 3 2];
y_correct = [1 4 3 2; 1 4 3 2];
assert(isequal(upAndDown(x),y_correct))
|
5 | Pass |
x = [8 9 3 9; 9 6 5 2; 2 1 9 9];
y_correct = [2 1 3 2; 8 6 5 9; 9 9 9 9;
9 9 9 9; 8 6 5 9; 2 1 3 2];
assert(isequal(upAndDown(x),y_correct))
|
6 | Pass |
x = 1:10;
y_correct = [x; x];
assert(isequal(upAndDown(x),y_correct))
|
7 | Pass |
x = (1:10)';
y_correct = [x; flipud(x)];
assert(isequal(upAndDown(x),y_correct))
|
8 | Pass |
x = reshape(1:9,[3,3]);
c = [1:3,3:-1:1]';
y_correct = [c,c+3,c+6];
assert(isequal(upAndDown(x),y_correct))
|
3895 Solvers
Number of 1s in a binary string
2827 Solvers
Find out missing number from a vector of 9 elements
245 Solvers
251 Solvers
175 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!