Problem 2234. Find and replace the zero array in a matrix
Solution Stats
Problem Comments
-
5 Comments
I think you want to write A and not x:
assert(isequal(adjacent_averaging(A),B))
test case #2 and 3 should be corrected. Instead of x, it should be A
What elements do you consider the "surrounding arrays"?
Surrounding arrays apparently are the elements right above, below, left, and right the zero elements. Found out by reverse engineering. The x is still a mystery.
More tests please. A lot of solutions assume that 0 can't be in the first (or last) column.
Solution Comments
-
1 Comment
Test cases are added to the problem.
Problem Recent Solvers43
Suggested Problems
-
8090 Solvers
-
317 Solvers
-
07 - Common functions and indexing 2
381 Solvers
-
07 - Common functions and indexing 6
417 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
351 Solvers
More from this Author2
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!