Cody

Problem 2455. Diagonal of a Spiral Matrix

Solution 1698517

Submitted on 22 Dec 2018
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
a = diag(spiral(4)); b = digSpi(4); assert(isequal(a,b));

Output argument "y" (and maybe others) not assigned during call to "digSpi". Error in Test1 (line 2) b = digSpi(4);

2   Fail
a = diag(spiral(5)); b = digSpi(5); assert(isequal(a,b));

Output argument "y" (and maybe others) not assigned during call to "digSpi". Error in Test2 (line 2) b = digSpi(5);

3   Fail
a = diag(spiral(6)); b = digSpi(6); assert(isequal(a,b));

Output argument "y" (and maybe others) not assigned during call to "digSpi". Error in Test3 (line 2) b = digSpi(6);

4   Fail
a = diag(spiral(7)); b = digSpi(7); assert(isequal(a,b));

Output argument "y" (and maybe others) not assigned during call to "digSpi". Error in Test4 (line 2) b = digSpi(7);

5   Fail
a = diag(spiral(8)); b = digSpi(8); assert(isequal(a,b));

Output argument "y" (and maybe others) not assigned during call to "digSpi". Error in Test5 (line 2) b = digSpi(8);