Cody

Problem 517. Wind outward from the center ...

Solution 2158906

Submitted on 13 Mar 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   Fail
x = 1; y_correct = 1; assert(isequal(your_fcn_name(x),y_correct)) x = 5; y_correct = [21 22 23 24 25 20 7 8 9 10 19 6 1 2 11 18 5 4 3 12 17 16 15 14 13]; assert(isequal(your_fcn_name(x),y_correct)) x = 9; y_correct = [ 73 74 75 76 77 78 79 80 81 72 43 44 45 46 47 48 49 50 71 42 21 22 23 24 25 26 51 70 41 20 7 8 9 10 27 52 69 40 19 6 1 2 11 28 53 68 39 18 5 4 3 12 29 54 67 38 17 16 15 14 13 30 55 66 37 36 35 34 33 32 31 56 65 64 63 62 61 60 59 58 57] assert(isequal(your_fcn_name(x),y_correct))

s = 1 p = 1 y = 1 y = 1 s = 1 16 15 14 13 2 17 24 23 12 3 18 25 22 11 4 19 20 21 10 5 6 7 8 9 p = 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 y = 25 y = 25 24 y = 25 24 23 y = 25 24 23 22 y = 25 24 23 22 21 y = 25 24 23 22 21 10 y = 25 24 23 22 21 10 9 y = 25 24 23 22 21 10 9 8 y = 25 24 23 22 21 10 9 8 7 y = 25 24 23 22 21 10 9 8 7 20 y = 25 24 23 22 21 10 9 8 7 20 11 y = 25 24 23 22 21 10 9 8 7 20 11 2 y = 25 24 23 22 21 10 9 8 7 20 11 2 1 y = 25 24 23 22 21 10 9 8 7 20 11 2 1 6 y = 25 24 23 22 21 10 9 8 7 20 11 2 1 6 19 y = 25 24 23 22 21 10 9 8 7 20 11 2 1 6 19 12 y = 25 24 23 22 21 10 9 8 7 20 11 2 1 6 19 12 3 y = 25 24 23 22 21 10 9 8 7 20 11 2 1 6 19 12 3 4 y = 25 24 23 22 21 10 9 8 7 20 11 2 1 6 19 12 3 4 5 y = 25 24 23 22 21 10 9 8 7 20 11 2 1 6 19 12 3 4 5 18 y = 25 24 23 22 21 10 9 8 7 20 11 2 1 6 19 12 3 4 5 18 13 y = 25 24 23 22 21 10 9 8 7 20 11 2 1 6 19 12 3 4 5 18 13 14 y = 25 24 23 22 21 10 9 8 7 20 11 2 1 6 19 12 3 4 5 18 13 14 15 y = 25 24 23 22 21 10 9 8 7 20 11 2 1 6 19 12 3 4 5 18 13 14 15 16 y = 25 24 23 22 21 10 9 8 7 20 11 2 1 6 19 12 3 4 5 18 13 14 15 16 17 y = 25 24 23 22 21 10 9 8 7 20 11 2 1 6 19 12 3 4 5 18 13 14 15 16 17

Assertion failed.

Suggested Problems

More from this Author30

Community Treasure Hunt

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

Start Hunting!