From: Ben Williams on 27 Sep 2009 12:31 Hi everybody, I'm trying to calculate eigenvalues and relative eigenvectors in decreasing order? I've used [V,D] = EIG(X) command, but the order is different from what I need. For example, if I type >> [A,B] = eig([2 0 0; 0 1 0; 0 0 7]) it assigns A = 0 1 0 1 0 0 0 0 1 B = 1 0 0 0 2 0 0 0 7 but I wanted 7 -> 2 -> 1 order! Any suggestions? thanks in advance!
From: Rune Allnor on 27 Sep 2009 12:44 On 27 Sep, 18:31, "Ben Williams" <super...(a)gmail.com> wrote: > Hi everybody, > I'm trying to calculate eigenvalues and relative eigenvectors in decreasing order? > > I've used [V,D] = EIG(X) command, but the order is different from what I need. > > For example, if I type>> [A,B] = eig([2 0 0; 0 1 0; 0 0 7]) > > it assigns > > A = > > 0 1 0 > 1 0 0 > 0 0 1 > > B = > > 1 0 0 > 0 2 0 > 0 0 7 > > but I wanted 7 -> 2 -> 1 order! > > Any suggestions? > thanks in advance! Sort the eigenvalues. Rune
From: Ben Williams on 27 Sep 2009 12:49 Ok, but then i need the eigenvector in the right order too.. how can i obtain this? > Sort the eigenvalues. > > Rune
From: Rune Allnor on 27 Sep 2009 13:05 On 27 Sep, 18:49, "Ben Williams" <super...(a)gmail.com> wrote: > Ok, but then i need the eigenvector in the right order too.. how can i obtain this? doc sort Rune
From: Ben Williams on 27 Sep 2009 13:26 ehi runa, are you joking? i know how to sort a vector, but if i sort the eigenvalues vector i loose the correspondencewith the eigenvectors matrix. so, does someone knows a solution?
|
Next
|
Last
Pages: 1 2 Prev: matlab decimal precision Next: Matlab, image, log function undefined for uint8 |