title: Linear least square equation solving using c++ eigen library (dynamic allocation)
body: <p>I am trying to solve a simple least square of type Ax = b. The c++ eigen library offers several functionalities regarding this and I have seen some kind of solutions here: <a href="https://stackoverflow.com/questions/13747290/solving-system-ax-b-in-linear-least-squares-fashion-with-complex-elements-and-lo">Solving system Ax=b in linear least squares fashion with complex elements and lower-triangular square A matrix</a> and here: <a href="https://stackoverflow.com/questions/22101591/least-squares-solution-of-linear-algerbraic-equation-ax-by-in-eigen-c">Least Squares Solution of Linear Algerbraic Equation Ax = By in Eigen C++</a>
  What I want to do is that using dynamic version of the matrix A and b. The elements of matrix A are floating points in my case and has 3 columns, but the number of data items (i.e. rows) will be dynamic (inside a loop).
  It will be helpful to have a short code snippet of basic declaration of A, b and filling out values. </p>