Cody

Solution 993628

Submitted on 4 Oct 2016 by elias GR
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
x = 1:15; y_correct = [ 1 0 0 0 0 2 3 0 0 0 4 5 6 0 0 7 8 9 10 0 11 12 13 14 15]; assert(isequal(vec2tril(x),y_correct))

2   Pass
x = 1:16; y_correct = [ 1 0 0 0 0 0 2 3 0 0 0 0 4 5 6 0 0 0 7 8 9 10 0 0 11 12 13 14 15 0 16 0 0 0 0 0]; assert(isequal(vec2tril(x),y_correct))