Problem 44104. Hilbert Scan Algorithm
As Zig-Zag and Horizontal ... we have also a < Hilbert Scan > as shown in this article http://link.springer.com/chapter/10.1007/11821045_31 : expls:
input: x= [1 2; 3 4];
output:
y=[3 1 2 4]
input: x= [1 2 3 4; 5 6 7 8; 9 10 11 12; 13 14 15 16]
output:
y=[13 14 10 9 5 1 2 6 7 3 4 8 12 11 15 16]
Solution Stats
Problem Comments
-
2 Comments
4th test example is incorrect:
y_correct = [2 49 15 58 59 5 52 14 22 44 29 35 34 23 41 32 40 26 47 14 9 64 2 55 54 3 61 12 20 46 27 37 36 30 43 21 ...
13 60 6 51 50 7 57 16 24 42 31 33 25 48 18 39 38 28 45 19 11 53 4 62 63 10 56 1];
the 1st number should be 8 but not 2.
the 20th number should be 17 but not 14.
huashou thank you for replied me for this mistake, so it's now clear have a good day.
Solution Comments
Show commentsProblem Recent Solvers9
Suggested Problems
-
Find relatively common elements in matrix rows
2087 Solvers
-
47 Solvers
-
How many monitors are connected ?
153 Solvers
-
373 Solvers
-
Test Problem; Create a 5x5 array containing all ones
388 Solvers
More from this Author14
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!