[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: [eigen] Diagonal
- From: Will S <billy.baloop@xxxxxxxxx>
- Date: Thu, 19 Aug 2010 18:49:53 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=Rve8XgI5qPuMvGrA9e/UQasU8pg+lsZgiesD/jQ7Llw=; b=ehA8nvbb1uYhJFjxPmE7o0zso/9/1MkhPlQ856s+QFIX8gCxvT24maMC8HUNJENki8 1HAWz443i4Unaxx04on4mCQYPaDAavfSZJTbx1jL+KIfWh7o4/g4WUFL4hxo+xf4Cw5X 0+5r1wfxLRJO4r5mYv7mSIwkNBla/yrrzsfZA=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=IqyXyeFVY4uTPfcsS3+4/fVLuizJJB+H2AVlfmFFfvCR+DQDJq9q1BPne/3PWZM/Ho nx9pQr5vLd8cvAW4o53uOEEmwJzgxgJUMY/mnUGY3Lpi/VywxtcQt/qymEK3pOceKq0+ zXsEDDmGO3W/L0S+7ti1VazqLP4G8RC9sG9tE=
So, I've retrieved the diagonal of a square nxn MatrixXd A with:
Diagonal diag = A.diagonal() ;
however oddly diag is a column vector and I cannot use it in
operations (like R = A - diag).
Can I use a diagonal matrix in regular MatrixXd operations?