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))
|
Back to basics 8 - Matrix Diagonals
707 Solvers
Who is the smartest MATLAB programmer?
469 Solvers
find the maximum element of the matrix
254 Solvers
07 - Common functions and indexing 3
254 Solvers
600 Solvers