Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 1;
y_correct = 1;
assert(isequal(union_jack(x),y_correct))
|
2 | Pass |
x = 3;
y_correct = ones(3);
assert(isequal(union_jack(x),y_correct))
|
3 | Pass |
x = 5;
y_correct = [1,0,1,0,1;
0,1,1,1,0;
1,1,1,1,1;
0,1,1,1,0;
1,0,1,0,1];
assert(isequal(union_jack(x),y_correct))
|
4 | Pass |
x = 7;
y_correct = [1,0,0,1,0,0,1;
0,1,0,1,0,1,0;
0,0,1,1,1,0,0;
1,1,1,1,1,1,1;
0,0,1,1,1,0,0;
0,1,0,1,0,1,0;
1,0,0,1,0,0,1];
assert(isequal(union_jack(x),y_correct))
|
5 | Pass |
x = 9;
y_correct = [1,0,0,0,1,0,0,0,1;
0,1,0,0,1,0,0,1,0;
0,0,1,0,1,0,1,0,0;
0,0,0,1,1,1,0,0,0;
1,1,1,1,1,1,1,1,1;
0,0,0,1,1,1,0,0,0;
0,0,1,0,1,0,1,0,0;
0,1,0,0,1,0,0,1,0;
1,0,0,0,1,0,0,0,1];
assert(isequal(union_jack(x),y_correct))
|
927 Solvers
Determine Whether an array is empty
561 Solvers
Append two matrix as shown below example
140 Solvers
119 Solvers
Find the sides of an isosceles triangle when given its area and height from its base to apex
126 Solvers