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!
Given an unsigned integer x, find the largest y by rearranging the bits in x
Project Euler: Problem 7, Nth prime
Construct an index vector from two input vectors in vectorized fashion
Find out sum and carry of Binary adder
I'm going to enjoy watching you calculate, Mr Anderson
Find my secret function II
Find my secret function I
Find the minimal value in N*N Matrix
Stop a ZigZag scanning N*N Matrix at any diag you want
Even or Odd
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office