Cody

Solution 2048272

Submitted on 5 Dec 2019 by Asif Newaz
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))

n = 3 b = 1 2 3 b = 1 1 2 2 3 0 b = 1 1 1 2 2 2 3 0 3 0 0 4

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))

n = 6 b = 0×1 empty double column vector b = 0 1 b = 0 1 1 b = 0 1 1 1 0 0 0 2 b = 0 1 1 1 0 0 0 0 2 0 b = 0 1 1 1 0 1 0 0 0 2 0 2 0 0 0 0 0 3