Problem 2592. LocateMembership | Membership of Matrix in another matrix

Let a and b be given by

 a = [ 2 1 1 1   
       1 2 1 1 
       1 1 2 1 
       1 1 1 2
       4 0 0 0 ] 
 b = [ 2 1 1
       1 2 1
       1 1 2 ]

then b can be created using a (b is wholly present in a). So output should be location of central element of b in a.

Here output is [3,3] else it should be [0,0].

Solution Stats

53.85% Correct | 46.15% Incorrect
Last Solution submitted on Aug 21, 2025

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers23

Suggested Problems

More from this Author6

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!