Cody

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

58.82% Correct | 41.18% Incorrect
Last solution submitted on Aug 26, 2016

Problem Comments

Tags

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Join the 15-year community celebration.

Play games and win prizes!

Learn more