Problem 512. Spot the rectangle
Solution Stats
Problem Comments
-
3 Comments
rifat
on 15 Jun 2014
test cases imply that the question title should be "spot the square"
Ned Gulley
on 14 Jan 2015
I added a rectangular (non-square) test case. Thanks for the note.
Christian Schröder
on 28 Sep 2022
Could you add
a = ones(3) - eye(3)
to the test suite?
Solution Comments
-
3 Comments
Christian Schröder
on 28 Sep 2022
This solution's actually not correct, since it incorrectly detects a rectangle in
a = ones(3) - eye(3)
Dyuman Joshi
on 29 Sep 2022
Test case has been added, and your solution has been rescored.
Christian Schröder
on 3 Oct 2022
Thank you!
-
2 Comments
Ned Gulley
on 21 Mar 2012
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!
Ned Gulley
on 20 Jan 2015
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 Solvers99
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!