Registered Member
|
Hi,
The question is X=A/B, while A(m,n),B(n,n),hoping X has(m,n) dimension. Direct inverse proves to be unstable. However, Eigen's solvers like householderQr() etc. requires m=n. In Matlab, I use X=A/B, it works great. I need suggestion how should I do in Eigen. Thank you. |
Moderator
|
In devel branch you can "solve on the right" as follows:
X = A * B.lu().inverse(); This won't compute the inverse explicitly, but appropriately apply the LU factors to A. You can also transpose the pb: WhateverDecomposition<MatrixXd> dec(B.transpose()); X.transpose() = dec.solve(A.transpose()); where WhateverDecomposition is PartialPivLU, HouseolderQR, etc. |
Registered Member
|
Thank you,ggael, Prob. solved. |
Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]