Path: news.mathworks.com!not-for-mail
From: "Titus" <titus.edelhofer@mathworks.de>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Eigen value and Eigen vector?
Date: Fri, 17 Aug 2007 09:13:25 +0200
Organization: The MathWorks, Inc.
Lines: 31
Message-ID: <fa3hql$1so$1@fred.mathworks.com>
References: <fa2bhu$5bp$1@fred.mathworks.com> <1187310068.805535.110740@19g2000hsx.googlegroups.com>
NNTP-Posting-Host: de-edelhoft-x.ac.mathworks.de
X-Trace: fred.mathworks.com 1187334805 1944 172.16.75.150 (17 Aug 2007 07:13:25 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 17 Aug 2007 07:13:25 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
Xref: news.mathworks.com comp.soft-sys.matlab:424244




"J.N." <joao.natali@gmail.com> schrieb im Newsbeitrag 
news:1187310068.805535.110740@19g2000hsx.googlegroups.com...
> On Aug 16, 4:20 pm, "stephen " <huan...@nationwide.com> wrote:
>> Hi,
>>
>> Matlab function [V,D]=eig() would generate eigenvalues in
>> ascending order and the associated eigenvectors.
>>
>> Is there an easy way to generate eigenvalues and
>> associated eigenvectors in descending order?
>>
>> Thanks,
>> Stephen
>
> There's probably an easier way, but, if not, try:
> [V,D]=eig()
> V = V(:,length(V(:,1)):-1:1) ;
> D = D(length(D(1,:)):-1:1,length(D(:,1)):-1:1) ;
>
> Joao
>

Hi,
slightly easier: use "end" instead of length:
V = V(:, end:-1:1);
D = D(end:-1:1,end:-1:1)

Titus