Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = [1 0;1 1];
n=30;
r=[50;51;50;51];
c=[50;50;51;51];
[y1,y2] = find(gameoflife_4(x,n));
assert(isequal(r,y1))
assert(isequal(c,y2))
|
2 | Pass |
x = [1,0;1,1;0,1];
n=10;
r=[51;50;52;50;52;51];
c=[49;50;50;51;51;52];
[y1,y2] = find(gameoflife_4(x,n));
assert(isequal(r,y1))
assert(isequal(c,y2))
|
3 | Pass |
x = [0,1,0;0,0,1;1,1,1];
n=100;
r=[77;75;77;76;77];
c=[75;76;76;77;77];
[y1,y2] = find(gameoflife_4(x,n));
assert(isequal(r,y1))
assert(isequal(c,y2))
|
4 | Pass |
x = [1 0 0 1 1;0 1 1 0 0;0 1 0 0 0;1 1 0 0 1; 0 1 1 1 0];
n=30;
r=[54,55,53,56,54,55]';
c=[52,52,53,53,54,54]';
[y1,y2] = find(gameoflife_4(x,n));
assert(isequal(r,y1))
assert(isequal(c,y2))
|
5 | Pass |
x=[1,1,1,1,1;1,1,0 0 0;1,0 0 0 1; 1 1 1 0 0; 0 0 1 1 1];
n=15;
r=[45
46
47
53
54
55
44
48
51
52
54
55
44
49
50
45
46
49
50
56
47
48
51
56
52
55];
c=[50
50
50
50
50
50
51
51
51
51
51
51
52
52
52
53
53
53
53
53
54
54
54
54
55
55]
[y1,y2] = find(gameoflife_4(x,n));
assert(isequal(r,y1))
assert(isequal(c,y2))
c =
50
50
50
50
50
50
51
51
51
51
51
51
52
52
52
53
53
53
53
53
54
54
54
54
55
55
|
81 Solvers
Back to basics 2 - Function Path
163 Solvers
309 Solvers
Get the length of a given vector
3559 Solvers
Getting the indices from a vector
3206 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!