title: Iterating through matrix rows in Octave without using an index or for loop
body: <p>I am trying to understand if it's possible to use Octave more efficiently by removing the for loop I'm using to calculate a formula on each row of a matrix X:</p>
  
  <pre><code>myscalar = 0
  for i = 1:size(X, 1),
    myscalar += X(i, :) * y(i) % y is a vector of dimension size(X, 1)
    ...
  </code></pre>
  
  <p>The formula is more complicate than adding to a scalar. The question here is really how to iterate through X rows without an index, so that I can eliminate the for loop.</p>