Cody

# Problem 44104. Hilbert Scan Algorithm

Solution 2955325

Submitted on 16 Sep 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
x = 1; y_correct = 1; assert(isequal(your_fcn_name(x),y_correct))

2   Pass
x =[1 2; 3 4]; y_correct = [3 1 2 4]; assert(isequal(your_fcn_name(x),y_correct))

3   Fail
x = [1 2 3 4; 5 6 7 8; 9 10 11 12; 13 14 15 16]; y_correct = [13 14 10 9 5 1 2 6 7 3 4 8 12 11 15 16]; assert(isequal(your_fcn_name(x),y_correct))

Undefined function 'hilbert_scan' for input arguments of type 'double'. Error in your_fcn_name (line 14) y = [hilbert_scan(b), hilbert_scan(a), hilbert_scan(d), hilbert_scan(c)]; Error in Test3 (line 3) assert(isequal(your_fcn_name(x),y_correct))

4   Fail
x =magic(8); y_correct = [8 49 15 58 59 5 52 14 22 44 29 35 34 23 41 32 40 26 47 17 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]; assert(isequal(your_fcn_name(x),y_correct))

Undefined function 'hilbert_scan' for input arguments of type 'double'. Error in your_fcn_name (line 14) y = [hilbert_scan(b), hilbert_scan(a), hilbert_scan(d), hilbert_scan(c)]; Error in Test4 (line 4) assert(isequal(your_fcn_name(x),y_correct))

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!