title: Set specified indices to zero
body: <p>I have two matrices (<code>x1</code> and <code>x2</code>) with same size. I would like to use the elements equal to zero in <code>x1</code> to put the sames elements to zero in <code>x2</code>.</p>
  
  <p>The non working solution I've got now follows:</p>
  
  <pre><code>[i j] = find(x1 == 0);
  x2(i,j) = 0;
  </code></pre>
  
  <p>I've also got a working solution which is:</p>
  
  <pre><code>[i j] = find(x1 == 0);
  for n=1:length(i)
      x2(i(n),j(n)) = 0;
  end
  </code></pre>
  
  <p>thanks!</p>