title: Find intersection between two data sets
body: <p>I am generating two arrays similar to this:</p>
  
  <pre><code>[x,y,z] = sphere;
  A=[x,y,z]
  B=[x+0.5,y+0.5,z+0.5]
  </code></pre>
  
  <p>The second array is at an offset to the first.</p>
  
  <p>I would like to find the intersection space of both of these arrays A and B. </p>
  
  <p>I have used the sphere function in this case but can this be done for any two data arrays not necessarily spherical. Is there a way to do this?</p>
  
  <p>I am including an image for what I am looking for. I want to find the intersection between these two areas. But the values are not necessarily going to be the same as you can see.</p>
  
  <p>If I have an equation for the limits of each of the spaces, would that make the problem easier?</p>
  
  <p><a href="https://i.stack.imgur.com/dZQh0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dZQh0.png" alt="enter image description here"></a></p>