[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug in EIGENQL ?
- Subject: Re: bug in EIGENQL ?
- From: Peter Mason <menakkis(at)my-deja.com>
- Date: Mon, 21 Jun 1999 00:20:38 GMT
- Newsgroups: comp.lang.idl-pvwave
- Organization: Deja.com - Share what you know. Learn what you don't.
- References: <7keh1s$5gp$1@mozo.cc.purdue.edu>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:15272
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:
evecs=1
evals=EIGENQL(covar_matrix,EIGENVECTORS=evecs)
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.