Path: news.mathworks.com!not-for-mail
From: "John D'Errico" <woodchips@rochester.rr.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: unsorted eigenvalues
Date: Wed, 4 Feb 2009 15:03:02 +0000 (UTC)
Organization: John D'Errico (1-3LEW5R)
Lines: 14
Message-ID: <gmcan6$i1n$1@fred.mathworks.com>
References: <fdhvq6$hok$1@fred.mathworks.com> <gmbtha$dip$1@fred.mathworks.com>
Reply-To: "John D'Errico" <woodchips@rochester.rr.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1233759782 18487 172.30.248.35 (4 Feb 2009 15:03:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 4 Feb 2009 15:03:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869215
Xref: news.mathworks.com comp.soft-sys.matlab:516002


"Morad Kassem" <morad_kassem@hotmail.com> wrote in message <gmbtha$dip$1@fred.mathworks.com>...

>  robert i have found one way to sort the eigenvectors and eigenvalues in the correct order in my case i hope it will help you.
> as i have the eigenvectiors changing with frequency, after applying eig()  i perform the dot product between V(frequency) and  V(frequency+1) and then i search the indices of the element that are closer to 1 then i reorder my vectors according to the new order.
> 
>  i hope i was enough clear and that this will solve your problem 

Yes, this is probably the best solution, and one
that I have wanted to do for a while. I wrote it
up this morning, and posted eigenshuffle.m on
the file exchange. Look for it later today or
possibly tomorrow.

John