Cody

Solution 1997870

Submitted on 31 Oct 2019
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 = 3; y_correct = [6 5 4]; assert(isequal(other_diag(x),y_correct))

Index in position 2 exceeds array bounds (must not exceed 1). Error in other_diag (line 3) y(i)=x(i,x+1-i) Error in Test1 (line 3) assert(isequal(other_diag(x),y_correct))

2   Fail
x = 4 y_correct = [13 10 7 4]; assert(isequal(other_diag(x),y_correct))

x = 4

Index in position 2 exceeds array bounds (must not exceed 1). Error in other_diag (line 3) y(i)=x(i,x+1-i) Error in Test2 (line 3) assert(isequal(other_diag(x),y_correct))

3   Fail
x = 7; y_correct = [28 27 26 25 24 23 22]; assert(isequal(other_diag(x),y_correct))

Index in position 2 exceeds array bounds (must not exceed 1). Error in other_diag (line 3) y(i)=x(i,x+1-i) Error in Test3 (line 3) assert(isequal(other_diag(x),y_correct))