Group Abstract Group Abstract

Message Boards Message Boards

0
|
4.4K Views
|
2 Replies
|
1 Total Like
View groups...
Share
Share this post:

Change the order of the eigenvalues and eigenvectors?

Posted 6 years ago
Attachments:
POSTED BY: Martina Reis
2 Replies

You can store the positions of the unit vectors in the eigensystems in a list, and then reorder eigenvalues and eigenvectors according to the position list:

posTableA = 
 Flatten@Table[Position[vecsA, N@UnitVector[8, i]], {i, 8}]
valsA[[posTableA]] == newvalsA
vecsA[[posTableA]] == newvecsA
posTableB = Flatten@Table[Position[vecsB, UnitVector[8, i]], {i, 8}]
valsB[[posTableB]] == newvalsB
vecsB[[posTableB]] == newvecsB
POSTED BY: Gianluca Gorni
Posted 6 years ago

Many thanks! It works!

POSTED BY: Martina Reis
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard