This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
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)))
t =
3 10 14 7
14 9 9 10
4 11 6 13
ans =
[]
x =
3 2 1 3
14 9 9 10
4 11 6 13
ans =
[]
|
2 | Pass |
x = eye(4);
y = matrixManipulation(x);
v = 3:15;
for i = 1:4
assert(isempty(setdiff(y(i,:),v)))
end
t =
6 13 5 4
8 7 5 9
15 3 4 11
7 15 3 13
ans =
[]
x =
6 13 5 4
8 7 5 9
15 3 4 11
7 15 3 13
ans =
[]
|
3 | Pass |
x = ones(4);
y = matrixManipulation(x);
assert(isequal(x,y))
t =
6 11 4 12
15 9 10 15
8 3 4 4
6 13 6 4
ans =
[]
x =
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
ans =
[]
|
280 Solvers
Project Euler: Problem 10, Sum of Primes
707 Solvers
Remove the two elements next to NaN value
411 Solvers
Who is the smartest MATLAB programmer?
561 Solvers
450 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!