[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in EIGENQL ?

gpetty@rain.atms.purdue.edu (Grant W. Petty) wrote:
> I encountered the following strange behavior when using the IDL (v 5.2
> under HP-UX 10.20) routine EIGENQL, which is supposed to compute the
> eigenvectors and eigenvalues of a real, symmetric matrix.  The error
> is reproducible on my system and seems to occur the first time EIGENQL
> is called during an IDL session but not thereafter.
<...example code cut...>

Grant, for some reason this particular routine wants its EIGENVECTORS=
keyword passed in as a "non-zero value", otherwise you're not supposed
to get any eigenvectors at all.   (Check out EIGENQL's online docs.)

e.g., What you should do is:

The first time you run it your eigenvectors variable is undefined
(essentially "zero") while on subsequent runs its a 7*7 matrix
("non-zero", e.g., as far as IDL's KEYWORD_SET() is concerned).

There are two ways of looking at this, and both have a bug:
1] It should work as documented and not return ANY eigenvectors if you
pass in a "zero" parameter with EIGENVECTORS=.   (In fact it returns a
matrix with what looks like work-in-progress data.)
2] It should be able to tell that you have used the EIGENVECTORS=
switch, even if the variable you specify there is undefined.

Other built-in (native code) IDL functions seem to be able to achieve 2]
somehow, so this is the way I really think it should work.

Peter Mason

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.