title: Matlab how to find out if a matrix is in another martrix
body: <p>Let me describe my problem with an example. Suppose we have matrix <code>A</code>:</p>
  
  <pre><code>A =
  
       1     0     1
       1     1     1
       0     1     1
  </code></pre>
  
  <p>and matrix <code>B</code>:</p>
  
  <pre><code>B =
  
       1     1
       1     1
  </code></pre>
  
  <p>How do i write function <code>C = func(A, B)</code> to check if <code>B</code> exists in <code>A</code> or not?<br>
   If it exists in <code>A</code>, the function returns <code>C = [0 0 0; 0 1 1; 0 1 1]</code>, and if it does not, the function returns <code>C = [0 0 0; 0 0 0; 0 0 0];</code>.</p>
  
  <p><strong>Edit:</strong><br>
  It should be mentioned that if <code>A</code> is <em>m</em>-by-<em>n</em>, and <code>B</code> is <em>p</em>-by-<em>q</em>, then <em>m</em> > <em>p</em> and  <em>p</em> > <em>q</em> always.</p>
  
  <p>Thanks in advance.</p>