title: Initialize an Eigen::MatrixXd from a 2d std::vector
body: <p>This should hopefully be pretty simple but i cannot find a way to do it in the Eigen documentation. </p>
  
  <p>Say i have a 2D vector, ie </p>
  
  <p><code>std::vector&lt;std::vector&lt;double&gt; &gt; data</code></p>
  
  <p>Assume it is filled with <code>10 x 4</code> data set. </p>
  
  <p>How can I use this data to fill out an <code>Eigen::MatrixXd mat</code>.</p>
  
  <p>The obvious way is to use a for loop like this:</p>
  
  <pre><code>#Pseudo code
  Eigen::MatrixXd mat(10, 4);
  for i : 1 -&gt; 10
     mat(i, 0) = data[i][0];
     mat(i, 1) = data[i][1];
     ...
   end
  </code></pre>
  
  <p>But there should be a better way that is native to Eigen?</p>