Return true if any isolated single zeros are present in the input M-by-N matrix (zeros with all adjacent elements being non-zero).
Example:
[ 2 2 0
2 0 5 ==> true
5 5 5 ]
[ 2 2 3
0 0 5 ==> false
5 5 5 ]
Background:
This function can be useful in different board games, such as Go, or the upcoming IQpuzzler challenge.
Solution Stats
Problem Comments
2 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers11
Suggested Problems
-
Select every other element of a vector
37220 Solvers
-
Project Euler: Problem 1, Multiples of 3 and 5
3733 Solvers
-
What is the distance from point P(x,y) to the line Ax + By + C = 0?
560 Solvers
-
Combinations without using nchoosek
141 Solvers
-
Generate binary combinations for a given number of bit(s)
96 Solvers
More from this Author5
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Since when does diagonally adjacent element are not counted as adjacent?
Or maybe you should clarify what you mean by adjacent.
The first example in the problem description was chosen just for this reason.