Cody

# Problem 42083. Ring Matrix

Solution 1158728

Submitted on 10 Apr 2017
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
n = 1; a = 1; assert(isequal(concentric_array(n),a))

a = 2

Assertion failed.

2   Fail
n = 3; a = [2 2 2; 2 1 2; 2 2 2]; assert(isequal(concentric_array(n),a))

a = 2 2 3 2 2 3 3 3 3

Assertion failed.

3   Fail
n = 5; a = [3 3 3 3 3; 3 2 2 2 3; 3 2 1 2 3; 3 2 2 2 3; 3 3 3 3 3]; assert(isequal(concentric_array(n),a))

a = 3 3 3 3 4 3 2 2 3 4 3 2 2 3 4 3 3 3 3 4 4 4 4 4 4

Assertion failed.

4   Fail
n = 7; a = [4 4 4 4 4 4 4; 4 3 3 3 3 3 4; 4 3 2 2 2 3 4; 4 3 2 1 2 3 4; 4 3 2 2 2 3 4; 4 3 3 3 3 3 4; 4 4 4 4 4 4 4]; assert(isequal(concentric_array(n),a))

a = 4 4 4 4 4 4 5 4 3 3 3 3 4 5 4 3 2 2 3 4 5 4 3 2 2 3 4 5 4 3 3 3 3 4 5 4 4 4 4 4 4 5 5 5 5 5 5 5 5

Assertion failed.

### Community Treasure Hunt

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

Start Hunting!