This solution is outdated. To rescore this solution, sign in.
Puzzling - solution 2231 uses imfilter but this solution fails because padarray isn't available. Both are in the IPT.
Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
A = [ ...
1 1 0 0
0 1 0 0
1 1 0 0
0 0 0 0];
B = [ ...
1 1 0 0
0 0 1 0
1 1 0 0
0 0 0 0];
assert(isequal(life(A),B))
Error: Undefined function 'padarray' for input arguments of type 'double'.
|
2 | Fail |
%%
A = [ ...
0 1 1 0
1 1 1 0
0 0 1 0
0 0 0 0];
B = [ ...
1 0 1 1
1 0 0 0
0 0 1 1
0 1 1 0];
assert(isequal(life(A),B))
Error: Undefined function 'padarray' for input arguments of type 'double'.
|
794 Solvers
167 Solvers
304 Solvers
Switch matrix to a column vector
188 Solvers
724 Solvers