Sorry, the logic of what the problem suggests is not very clear to me. Should the input 2D matrix be broken up in 2-by-2 matrices first, and why?
@Bainhome, I believe your code cannot perform an adaptive zigzag scan of a valid 2x2 matrix due to the conditional statement implemented.
S**t, a euqal sign is forgotten...THX buddy.
What this code done to the index by using union is well-considered. Nice!
184 Solvers
2268 Solvers
Selecting books on MATLAB for experts and beginners (blindfolded)
66 Solvers
Make a random, non-repeating vector.
3040 Solvers
Convert a vector into a number
507 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!