Problem 924. intersection of matrices
Given two matrices filled with ones and zeros, determine if they share a common row, column entry. These matrices are of identical size.
Examples:
Inputs 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 ]
and 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 ]
Output tf is false
Inputs 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 ]
and 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]
Output tf is true
Solution Stats
Problem Comments
-
10 Comments
Show
7 older comments
Marco Riani
on 22 Jan 2022
A small addendum to the comment of Chien-Han Su
Just consider the problem to be "Is there any i, j such that A(i,j) == B(i,j) and A(i,j) or B(i,j) ~=0"
Jung Un Park
on 5 Jul 2023
Problem description is poor.
Olayinka
on 11 Nov 2023
Please explain this problem for further clarity
Solution Comments
Show commentsProblem Recent Solvers599
Suggested Problems
-
Implement simple rotation cypher
1084 Solvers
-
Matrix with different incremental runs
522 Solvers
-
Try 1.5.4: Celsius to Fahrenheit
831 Solvers
-
647 Solvers
-
596 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!