Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = [0 0 0 0 0 0;0 0 0 0 0 0;0 0 1 0 0 0;0 0 1 0 0 0;0 0 0 1 0 0;0 0 0 0 0 0];
y_correct = 1;
assert(isequal(block3(x),y_correct))
ans{1} =
0
ans{2} =
0 0 0 0 0 0
0 0 0 0 0 0
0 0 1 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 0 0 0
ans{1} =
1
ans{2} =
0 0 0 0 0 0
0 0 0 0 0 0
0 0 1 0 0 0
0 0 1 0 0 0
0 0 1 0 0 0
0 0 0 0 0 0
|
2 | Pass |
%%
x = [0 0 0 0 0 0;0 0 0 0 0 0;0 0 1 0 0 0;0 1 0 0 0 0;0 0 1 0 0 0;0 0 0 0 0 0];
y_correct = 1;
assert(isequal(block3(x),y_correct))
ans{1} =
0
ans{2} =
0 0 0 0 0 0
0 0 0 0 0 0
0 0 1 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 0 0 0
ans{1} =
1
ans{2} =
0 0 0 0 0 0
0 0 0 0 0 0
0 0 1 0 0 0
0 0 1 0 0 0
0 0 1 0 0 0
0 0 0 0 0 0
|
3 | Pass |
%%
x = [0 0 0 0 0 0;0 0 0 0 0 0;0 0 1 0 0 0;0 0 0 1 0 0;0 0 0 0 1 0;0 0 0 0 0 0];
y_correct = 2;
assert(isequal(block3(x),y_correct))
ans{1} =
0
ans{2} =
0 0 0 0 0 0
0 0 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 0
ans{1} =
1
ans{2} =
0 0 0 0 0 0
0 0 0 0 0 0
0 0 1 0 1 0
0 0 0 1 0 0
0 0 0 0 0 0
0 0 0 0 0 0
ans{1} =
2
ans{2} =
0 0 0 0 0 0
0 0 0 0 0 0
0 0 1 1 1 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
|
4 | Fail |
%%
x = [0 0 0 0 0 0;0 0 1 0 0 0;0 0 0 0 0 0;0 0 1 0 0 0;0 0 0 0 0 0;0 0 1 0 0 0];
y_correct = 2;
assert(isequal(block3(x),y_correct))
Error: Assertion failed.
|
5 | Fail |
%%
x = [0 0 0 0 0 0;0 0 0 0 0 0;0 1 0 1 1 0;0 0 0 0 0 0;0 0 0 0 0 0;0 0 0 0 0 0];
y_correct = 1;
assert(isequal(block3(x),y_correct))
Error: Assertion failed.
|
6 | Fail |
%%
x = [0 0 0 0 0 0;0 0 0 0 0 0;0 0 0 1 1 0;0 0 0 0 0 0;0 0 1 0 0 0;0 0 0 0 0 0];
y_correct = 2;
assert(isequal(block3(x),y_correct))
Error: Assertion failed.
|
7 | Fail |
%%
x = [0 0 0 0 0 0;0 0 0 0 0 0;0 0 0 1 1 0;0 0 0 1 0 0;0 0 0 0 0 0;0 0 0 0 0 0];
y_correct = 2;
assert(isequal(block3(x),y_correct))
Error: Index exceeds matrix dimensions.
|
8 | Fail |
%%
x = [0 0 0 0 0 0;0 0 0 0 0 0;0 0 0 1 0 0;0 0 0 1 1 0;0 0 0 0 0 0;0 0 0 0 0 0];
y_correct = 2;
assert(isequal(block3(x),y_correct))
Error: Index exceeds matrix dimensions.
|
9 | Fail |
%%
x = [0 0 0 0 0 0;0 0 1 0 1 0;0 0 0 0 0 0;0 0 0 0 0 0;0 0 0 1 0 0;0 0 0 0 0 0];
y_correct = 3;
assert(isequal(block3(x),y_correct))
Error: Assertion failed.
|
10 | Fail |
%%
x = [0 0 0 0 0 0;0 0 1 0 1 0;0 0 1 0 0 0;0 0 0 0 0 0;0 0 0 0 0 0;0 0 0 0 0 0];
y_correct = 2;
assert(isequal(block3(x),y_correct))
Error: Index exceeds matrix dimensions.
|
2110 Solvers
16 Solvers
Four quadrant inverse tangent function.
37 Solvers
205 Solvers
25 Solvers