title: Update matrix, single column per row where row index is in vecor
body: <p>Is there a way to update different column in each row of matrix, where row indices are stored in vector.</p>
  
  <p><strong>Example</strong></p>
  
  <pre><code>mx = zeros(10,10);
  cols = [2 3 5 4 6 8 9 1 2 3]';
  for i = 1:size(mx,1)
      mx(i,cols(i)) = 1;
  end
  mx
  </code></pre>
  
  <p>produces</p>
  
  <pre><code>0   1   0   0   0   0   0   0   0   0
  0   0   1   0   0   0   0   0   0   0
  0   0   0   0   1   0   0   0   0   0
  0   0   0   1   0   0   0   0   0   0
  0   0   0   0   0   1   0   0   0   0
  0   0   0   0   0   0   0   1   0   0
  0   0   0   0   0   0   0   0   1   0
  1   0   0   0   0   0   0   0   0   0
  0   1   0   0   0   0   0   0   0   0
  0   0   1   0   0   0   0   0   0   0
  </code></pre>
  
  <p>The question is, whether I can do it without the for loop?</p>