Cody

Solution 1740163

Submitted on 1 Mar 2019 by Martin C.
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 = [3 2 1 3; 3 0 0 1; 0 4 3 1]; y = matrixManipulation(x); v = 3:15; assert(isequal(x(1,:),y(1,:))) assert(isempty(setdiff(y(2,:),v))) assert(isempty(setdiff(y(3,:),v)))

x = 3 2 1 3 9 9 7 11 0 4 3 1 x = 3 2 1 3 9 9 7 11 4 12 7 13 y = 3 2 1 3 9 9 7 11 4 12 7 13

2   Pass
x = eye(4); y = matrixManipulation(x); v = 3:15; for i = 1:4 assert(isempty(setdiff(y(i,:),v))) end

x = 11 11 7 12 0 1 0 0 0 0 1 0 0 0 0 1 x = 11 11 7 12 13 8 6 10 0 0 1 0 0 0 0 1 x = 11 11 7 12 13 8 6 10 14 13 5 10 0 0 0 1 x = 11 11 7 12 13 8 6 10 14 13 5 10 6 5 9 10 y = 11 11 7 12 13 8 6 10 14 13 5 10 6 5 9 10

3   Pass
x = ones(4); y = matrixManipulation(x); assert(isequal(x,y))

y = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Suggested Problems