title: assigning the same arrays to a list of rows
body: <p>I have an nx2 matrix corresponding to some x,y values and what I'd like to do is replace a subset of the 1x2 rows with some values. Currently I get that subset using find(). for instance, if I had the following matrix:</p>
  
  <pre><code> k=    [1 2
          3 4
          5 6
          7 8
          9 0]
  </code></pre>
  
  <p>and I used find() on some other related 5x1 array to get say, the indices</p>
  
  <pre><code>indices = [1 3 5]
  </code></pre>
  
  <p>I would then like to quickly change rows 1, 3, and 5 in k to the same, predetermined row like for instance [-2 -6]. So the result would be...</p>
  
  <pre><code> k=     [-2 -6
            3  4
           -2 -6
            7  8
           -2 -6]
  </code></pre>
  
  <p>I know that for an individual row I can just do k(1,:) = [-2 -6] but I can't seem to find the syntax for doing this generally to a list of rows. k(indices,:) = [-2 -6] is not a valid syntax. There is of course the two-line solution of doing it for column 1 and then column 2 but I would thing there is a compact way of doing this. Thanks.</p>