Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = [1 2 1;
5 6 7;
2 3 6];
output = [1 1 1;
1 1 1;
1 1 1]
assert(isequal(neighbors(x),output))
output =
1 1 1
1 1 1
1 1 1
|
2 | Pass |
x = [8 8 8;
4 4 4;
1 9 7]
output = [1 1 1;
1 1 1;
0 0 0]
assert(isequal(neighbors(x),output))
x =
8 8 8
4 4 4
1 9 7
output =
1 1 1
1 1 1
0 0 0
|
3 | Pass |
x = [1 8 5;
4 10 22;
1 66 7]
output = [0 0 0;
0 0 0;
0 0 0]
assert(isequal(neighbors(x),output))
x =
1 8 5
4 10 22
1 66 7
output =
0 0 0
0 0 0
0 0 0
|
6724 Solvers
Sort a list of complex numbers based on far they are from the origin.
4327 Solvers
733 Solvers
Number of 1s in a binary string
2827 Solvers
394 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!