Cody

Solution 1783145

Submitted on 11 Apr 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
m = 5; n = 4; x = 5; y_correct = [5 5 5 5; 5 5 5 5; 5 5 5 5; 5 5 5 5; 5 5 5 5] assert(isequal(array_x(m,n,x),y_correct));

y_correct = 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5

Assertion failed.

2   Fail
m = 4; n = 3; x = -7; y_correct = [-7 -7 -7; -7 -7 -7; -7 -7 -7; -7 -7 -7] assert(isequal(array_x(m,n,x),y_correct));

y_correct = -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7

Assertion failed.

3   Fail
m = 2; n = 6; x = 11; y_correct = [11 11 11 11 11 11; 11 11 11 11 11 11] assert(isequal(array_x(m,n,x),y_correct));

y_correct = 11 11 11 11 11 11 11 11 11 11 11 11

Assertion failed.

4   Pass
m = 8; n = 1; x = 42; y_correct = [42; 42; 42; 42; 42; 42; 42; 42] assert(isequal(array_x(m,n,x),y_correct));

y_correct = 42 42 42 42 42 42 42 42