[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: eig() function
From: |
John W. Eaton |
Subject: |
Re: eig() function |
Date: |
Fri, 10 Oct 1997 00:24:28 -0500 |
On 9-Oct-1997, Marvin Vis <address@hidden> wrote:
| > If sorting the eigenvalues and their corresponding eigenvectors in the
| > eig() function is not complicated and can speed up the process, wouldn't
| > it be better to add the sorting algorithm as an additional OPT feature in
| > the eig function instead of the above macros?
|
| Try using the flipud() and fliplr() functions on your v,d matrices above...
|
| function [v,d] = eigd (x)
| [v,d] = eig (x);
| v = fliplr(v);
| d = flipud(fliplr(d)); % or use: d = diag(flipud(diag(d)))
| % ...whichever is faster
| end
|
| My personal vote is to not load any of the built-in linear algebra package
| subroutines.
I agree, and since it is possible to do what you want by defining a
separate function, I'm not likely to add such a feature to eig myself.
But if someone else contributes the code, I'd probably agree to install
it.
jwe