Cody

Solution 988480

Submitted on 1 Oct 2016 by Peng Liu
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
n = 1; a = 1; assert(isequal(concentric_array(n),a))

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

3   Pass
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))

4   Pass
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))