title: How to compute only the diagonal of a matrix product in Octave?
body: <p>Is there a way in Octave to compute and store only the diagonal of a matrix product?</p>
  
  <p>Basically like doing: <code>vector = diag(A*B);</code></p>
  
  <p>I don't care about any of the values of <code>A*B</code> except those on the diagonal. The matrix sizes are around <code>80k x 12</code> and <code>12 x 80k</code>, so even if I didn't care about the speed/extra memory it simply wont fit in RAM.</p>
  
  <p>Strange, since Octave is a package for huge data sets and diagonals are very important, so it should be possible.</p>