Cody

Solution 1147138

Submitted on 28 Mar 2017 by Binbin Qi
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
x = 4; y_correct = [1 2 6 7; 3 5 8 13;4 9 12 14;10 11 15 16]; assert(isequal(diagAdiag(x),y_correct))

2   Pass
x = 5; y_correct = [1 2 6 7 15;3 5 8 14 16;4 9 13 17 22;10 12 18 21 23;11 19 20 24 25]; assert(isequal(diagAdiag(x),y_correct))