title: Vectorization Octave
body: <p>I am struggling with some basic vectorization operations in Octave. </p>
  
  <p>Lets say I instantiate a 10*10 matrix A. 
  <code>A = magic(10)</code>
  I also instantiate a vector x. <code>x = [1; 2; 3; 4; 5; 6; 7; 8; 9; 10]</code></p>
  
  <p>I want to use a vectorized operation, instead of for loops to fill in an empty vector e. 
  <code>e = zeros(10,1)</code></p>
  
  <pre><code>for i = 1:10
    for j = 1:10
      v(i) = v(i) + A(i, j) * x(j);
    end
  end
  </code></pre>
  
  <p>I have studied the the octave documentation chapter 19 about vectorization, and I believe that the only answer is <code>v = A * x</code>. But I am unsure, whether other options exist to vectorize this loop.   </p>