I have a 1D matrix in MATLAB, which, created with the best answer of the question mentioned below, I would like to reorder it in the first array:
Zigzag Matrix Ordering
Source: Wikidpedia: Jpeg
m = [69 9 75 46 23 16 100 83 92 54 8 45];
zigzag_writing(m, 4, 3)
ANS =
69 9 16 100
75 23 83 8
46 92 54 45
source
share