Cody

Solution 341858

Submitted on 29 Oct 2013 by AKSHAY POTUWAR
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.3432 0.3346 0.0327 0.8770 0.6364 0.0779 0.8618 0.2711 0.4534 0.7232 0.5420 0.3312 0.8172 0.1075 0.6169 0.8402
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.4757 0.8975 0.9773 0.5059 0.7945 0.4508 0.7866 0.0476
4   Pass
%% x = zeros(0,1); y_correct = 0; assert(isequal(addrow(x),y_correct))
y = 0