Cody

Solution 470535

Submitted on 12 Jul 2014 by Vinod Sudheesh
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 = rand(4); y_correct = [zeros(1,size(x,2));x]; assert(isequal(addrow(x),y_correct))
y = 0 0 0 0 0.0901 0.3213 0.3650 0.5412 0.1309 0.7080 0.0534 0.7494 0.6416 0.4577 0.0975 0.2676 0.6541 0.5166 0.4441 0.1592
2   Pass
%% x = []; y_correct = zeros(1,0); assert(isequal(addrow(x),y_correct))
y = Empty matrix: 1-by-0
3   Pass
%% x = rand(8,1); y_correct = [zeros(1,size(x,2));x]; assert(isequal(addrow(x),y_correct))
y = 0 0.2834 0.5092 0.3387 0.7802 0.0964 0.1766 0.3536 0.2245
4   Pass
%% x = zeros(0,1); y_correct = 0; assert(isequal(addrow(x),y_correct))
y = 0