Cody

Solution 1740161

Submitted on 1 Mar 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 = [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)))

Error in solution Line: 4 Column: 43 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

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

Error in solution Line: 4 Column: 43 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

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

Error in solution Line: 4 Column: 43 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.