Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
a = [ 1 0 0 0 0
0 0 0 1 0
0 0 0 0 1
0 0 0 0 1
0 0 1 0 0 ];
tf = false;
assert(isequal(has_rectangle(a),tf))
|
2 | Pass |
a = [ 1 0 1 0
0 0 1 0
1 0 1 0
0 0 1 1 ];
tf = true;
assert(isequal(has_rectangle(a),tf))
|
3 | Pass |
a = [ 1 0 1 0
0 0 1 1
0 0 1 1 ];
tf = true;
assert(isequal(has_rectangle(a),tf))
|
4 | Pass |
a = [ 1 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 1 0
1 0 0 0 0 0 0 1 0 ];
tf = true;
assert(isequal(has_rectangle(a),tf))
|
5 | Pass |
a = zeros(20);
tf = false;
assert(isequal(has_rectangle(a),tf))
|
6 | Pass |
a = ones(9);
tf = true;
assert(isequal(has_rectangle(a),tf))
|
7 | Pass |
a = double(magic(6)<9);
tf = false;
assert(isequal(has_rectangle(a),tf))
|
Count from 0 to N^M in base N.
220 Solvers
Project Euler: Problem 9, Pythagorean numbers
282 Solvers
Who knows the last digit of pi?
557 Solvers
Remove the two elements next to NaN value
411 Solvers
169 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!