Problem 512. Spot the rectangle
Solution Stats
Problem Comments
-
3 Comments
test cases imply that the question title should be "spot the square"
I added a rectangular (non-square) test case. Thanks for the note.
Could you add
a = ones(3) - eye(3)
to the test suite?
Solution Comments
-
3 Comments
This solution's actually not correct, since it incorrectly detects a rectangle in
a = ones(3) - eye(3)
Test case has been added, and your solution has been rescored.
Thank you!
-
2 Comments
This is a good answer. I changed the test suite so that you wouldn't have to deal with logical input matrices. Sorry about that!
This code is referenced in the following blog post: http://blogs.mathworks.com/community/2015/01/19/robot-game-playing-in-matlab-part-2/
Problem Recent Solvers98
Suggested Problems
-
1217 Solvers
-
Omit columns averages from a matrix
560 Solvers
-
334 Solvers
-
Back to basics 12 - Input Arguments
570 Solvers
-
517 Solvers
More from this Author50
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!