Thursday 15 April 2010

linear - Solving a underdetermined equation system in Eigen (C++) -


In my case, I want to solve an undated equation system, A * Î »= b, JacobiSVD

In the linear equation system, my C ++ program has the following structure:

Coefficient matrix ( A ): 0.6 5.68434e-20 -0.2 5.68434-20 7.06819-39 -4.26326e-20 -0.2 -4.26326e-20 0.4

RHS ( B ):

  -1.962 2.78817e-1 9 -5.886   

Lumbda :

  -9.81 3. 9 4467e + 19 & lt; ---------- Error (where does it come from?) -19.62   
  • Rank of matrix A - rank (a) = 2 < / Strong>
  • Then there is no complete space for the matrix. Therefore, A is singular and not inverse.
  • The condition is - cond (A) = IP
  • To solve A * Î »= B, I will call it Eugene (JakobSVD) SVD used the decomposition method

    I also verified it with MATLAB:

    On the starting, the first simulation step is almost perfect but a lot There is a small numerical error, which is increasing while solving A * Î »= B.

    Then the system is crashing and my results are no longer correct and I get NaN results.

    Code here:

      / ******** SVD ******** / Jacobi SVD & lt; TMatrixX & gt; SDD (A, ComputeneU | Computaneous); Lambda = svd.solve (b);   

    What have I done?

    Jacobi SVD All non-resolved -zeros singular value I recommend using ColPivHouseholderQR .

No comments:

Post a Comment