title: What is the recommended way to iterate a matrix over rows?
body: <p>Given a matrix <code>m = [10i+j for i=1:3, j=1:4]</code>, I can iterate over its rows by slicing the matrix:</p>
  
  <pre><code>for i=1:size(m,1)
      print(m[i,:])
  end
  </code></pre>
  
  <p>Is this the only possibility? Is it the recommended way?</p>
  
  <p>And what about comprehensions? Is slicing the only possibility to iterate over the rows of a matrix?</p>
  
  <pre><code>[ sum(m[i,:]) for i=1:size(m,1) ]
  </code></pre>