title: How can I write entire rows into an Armadillo matrix?
body: <p>In Armadillo I want to save many row vectors into a matrix. I can change an entry of a matrix A with:</p>
  
  <pre><code>arma:mat A(10,10, 0); // create a 10x10 matrix filled with zeros.
  A(i,j) = 1.23; // set element at positon (i,j) to 1.23.
  </code></pre>
  
  <p>Is there a way of changing an entire row of the matrix at once? e.g.:</p>
  
  <pre><code>arma::rowvec V(10); // a row vector of length 10.
  A(i) = V; //write entire rowvector V into matrix at position i.
  </code></pre>
  
  <p>I know I can use
      A.insert_rows(i, V);
  to insert my Vector V into the matrix, but I want to replace it. In my code I already know the dimensions of my matrix. I could also append the rows at the and, but I read somewhere that the code runs faster, if I don't change the size of the matrix and instead initialize it with the right size.
  If anyone's interested I am writing a programm that is solving differential equations and I need to write the system state (a vector) into an array (an Armadillo Matrix) in order to save the timeseries.</p>
  
  <p>I thought I could use armadillo matrices, because my system state is an armadillo vector. I looked around in Armadillo's documentation but I cannot find a proper way to to this. (Proper meaning anything other than writing a loop that iterates over all entries of my vector - I know C++ is doing something like this internally, but my guess is that using armadillo functions would be faster).</p>