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 |
A = [1 0 0 0 0;...
0 1 0 0 0;...
0 0 1 0 0;...
0 0 0 1 0;...
0 0 0 0 1];
B = [0 1 0 0 0;...
0 0 1 0 0;...
0 0 0 1 0;...
0 0 0 0 1;...
1 0 0 0 0];
tf_correct = 0;
assert(isequal(intersection_of_matrices(A,B),tf_correct))
|
2 | Pass |
A = [1 1 0 0 0;...
0 1 1 0 0;...
0 0 1 1 0;...
0 0 0 1 1;...
1 0 0 0 1];
B = [0 0 0 0 1;...
1 0 0 0 0;...
0 1 0 0 0;...
0 0 1 0 0;...
0 0 0 1 0];
tf_correct = 0;
assert(isequal(intersection_of_matrices(A,B),tf_correct))
|
3 | Pass |
A = [1 1 0 0 1;...
1 1 1 0 0;...
0 1 1 1 0;...
0 0 1 1 1;...
1 0 0 1 1];
B = [0 0 1 0 0;...
0 0 0 1 0;...
0 0 0 0 1;...
1 0 0 0 0;...
0 1 0 0 0];
tf_correct = 0;
assert(isequal(intersection_of_matrices(A,B),tf_correct))
|
4 | Pass |
A = [1 1 1 0 1;...
1 1 1 1 0;...
0 1 1 1 1;...
1 0 1 1 1;...
1 1 0 1 1];
B = [0 1 0 0 0;...
1 0 0 0 0;...
0 0 0 0 1;...
0 0 0 1 0;...
0 0 1 0 0];
tf_correct = 1;
assert(isequal(intersection_of_matrices(A,B),tf_correct))
|
5 | Pass |
A = [1 1 0 0 1;...
1 1 1 0 0;...
0 1 1 1 0;...
0 0 1 1 1;...
1 1 0 1 1];
B = [0 0 1 0 0;...
0 0 0 1 0;...
0 0 0 0 1;...
1 0 0 0 0;...
0 1 0 0 0];
tf_correct = 1;
assert(isequal(intersection_of_matrices(A,B),tf_correct))
|
Select every other element of a vector
20339 Solvers
Reverse the Words (not letters) of a String
297 Solvers
Project Euler: Problem 1, Multiples of 3 and 5
1491 Solvers
309 Solvers
Find the Oldest Person in a Room
5100 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!