Cody

Solution 260039

Submitted on 12 Jun 2013 by Suman Saha
  • Size: 11
  • This is the leading solution.
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
%% a = [3 2 4]; y_correct = [1 1 1;2 2 2;3 0 3;0 0 4]; assert(isequal(matInc(a),y_correct))
ans = []
2   Pass
%% a = [0 1 1 2 0 3]; y_correct = [0 1 1 1 0 1;0 0 0 2 0 2;0 0 0 0 0 3]; assert(isequal(matInc(a),y_correct))
ans = []