[eigen] How to obtain the matrices Q and R of a QR decomposition |

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: [eigen] How to obtain the matrices Q and R of a QR decomposition*From*: Sebastian Birk <birk@xxxxxxxxxxxxxxxxxxxxx>*Date*: Thu, 11 Nov 2010 10:40:56 +0100

Hi, using Eigen 3 I would expect the following code to give me Q and R: MatrixXcd A = MatrixXcd::Random(m,m), Q, R; HouseholderQR<MatrixXcd> hh(A); // MATLAB economy size QR decomp.: [Q,R] = qr( A, 0 ); Q = hh.householderQ(); R = hh.matrixQR().triangularView<Upper>(); But when I take a look (via cout) at Q and R they both are exactly the same as A. Where is the flaw in this approach? Thanks, Sebastian

**Attachment:
signature.asc**

**Follow-Ups**:**Re: [eigen] How to obtain the matrices Q and R of a QR decomposition***From:*Gael Guennebaud

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] SelfAdjointView<> as LHS expression for optimizations?** - Next by Date:
**Re: [eigen] Build Failure** - Previous by thread:
**Re: [eigen] [Sparse][LU] scale factors** - Next by thread:
**Re: [eigen] How to obtain the matrices Q and R of a QR decomposition**

Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |