title: Matlab multiply each row in matrix by different number
body: <p>Say that I have a matrix:</p>
  
  <pre><code>A = [ 1 2 3 ; 4 5 6 ; 7 8 9 ; 10 11 12];
  </code></pre>
  
  <p>Is there a way to multiply :<br>
  row 1 by 1<br>
  row 2 by 2<br>
  row 3 by 3<br>
  and so on?</p>
  
  <p>I am able to do this with for loops, however it if for an assignment where they want us to use matrices.
  In the actual assignment <code>A</code> is filled with random number but each row which by multiplied consecutively.</p>
  
  <p>Thanks, any help is much appreciated</p>