Cody

Solution 1859938

Submitted on 27 Jun 2019
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   Fail
x = [1]; y_correct = [0 0 0 0 1 0 0 0 0]; assert(isequal(zeroWrap(x),y_correct))

Undefined function 'padarray' for input arguments of type 'double'. Error in zeroWrap (line 2) y = padarray(B,[1 1],0,'both'); Error in Test1 (line 5) assert(isequal(zeroWrap(x),y_correct))

2   Fail
x = randi(10,4,5); m=zeroWrap(x); assert(isequal(m(2:end-1,2:end-1),x))

Undefined function 'padarray' for input arguments of type 'double'. Error in zeroWrap (line 2) y = padarray(B,[1 1],0,'both'); Error in Test2 (line 2) m=zeroWrap(x);

3   Fail
x = randi(10,4,5); m=zeroWrap(x); assert(isequal(sum(m(1,:)),0))

Undefined function 'padarray' for input arguments of type 'double'. Error in zeroWrap (line 2) y = padarray(B,[1 1],0,'both'); Error in Test3 (line 2) m=zeroWrap(x);

4   Fail
x = randi(10,4,5); m=zeroWrap(x); assert(isequal(sum(m(end,:)),0))

Undefined function 'padarray' for input arguments of type 'double'. Error in zeroWrap (line 2) y = padarray(B,[1 1],0,'both'); Error in Test4 (line 2) m=zeroWrap(x);

5   Fail
x = randi(10,4,5); m=zeroWrap(x); assert(isequal(sum(m(:,1)),0))

Undefined function 'padarray' for input arguments of type 'double'. Error in zeroWrap (line 2) y = padarray(B,[1 1],0,'both'); Error in Test5 (line 2) m=zeroWrap(x);

6   Fail
x = randi(10,4,5); m=zeroWrap(x); assert(isequal(sum(m(:,end)),0))

Undefined function 'padarray' for input arguments of type 'double'. Error in zeroWrap (line 2) y = padarray(B,[1 1],0,'both'); Error in Test6 (line 2) m=zeroWrap(x);

7   Fail
x = randi(10,4,5); m=zeroWrap(x); assert(isequal(size(m)-2,size(x)))

Undefined function 'padarray' for input arguments of type 'double'. Error in zeroWrap (line 2) y = padarray(B,[1 1],0,'both'); Error in Test7 (line 2) m=zeroWrap(x);