comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » BUG in IDL 5.0.2 VERSION OF POLY_FIT
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
BUG in IDL 5.0.2 VERSION OF POLY_FIT [message #9889] Tue, 16 September 1997 00:00
Jack Saba is currently offline  Jack Saba
Messages: 30
Registered: January 1996
Member
Name: Jack Saba
E-mail Address: jack@magus.stx.com
IDL version: 5.0.2
Platform and OS: HP 9000/700 HP-UX 10.20

Description of Behavior:

POLY_FIT returns "Singular matrix detected" with data that ran fine
under IDL 4.


Example Code:

t = FINDGEN(1000)
Unconvolved = a 1000-element perfect Gaussian centered near t=500.
UFit = GAUSSFIT ( t, Unconvolved, UCoefs)

> % Compiled module: GAUSSFIT.
> % Compiled module: POLY_FIT.
> % POLY_FIT: Singular matrix detected.
> % Error occurred at: POLY_FIT 104
> /usr/local/rsi/idl_5/lib/poly_fit.pro
> % GAUSSFIT 161
> /usr/local/rsi/idl_5/lib/gaussfit.pro
> % $MAIN$ 45 anal.pro


Known Workarounds or Fixes:

See below


RSI Technical Support Response:

The problem you are experiencing is from an error introduced into
POLY_FIT(). The following lines should be changed such that the error
does not occur -- on lines 103/104 (I believe) of POLY_FIT(), change

CORRM = INVERT(CORRM, status) ;INVERT MATRIX.
if status ne 0 then message, "Singular matrix detected."

to

CORRM = INVERT(CORRM, status) ;INVERT MATRIX.
if status eq 1 then message, "Singular matrix detected.", $
/INFORMATIONAL ;optional INFORMATIONAL keyword


The condition exists because a "2" is returned in the STATUS positional
parameter for ill-conditioned Vander Monde matrices. Often with these
matrices, they are ill-conditioned though the solution from POLY_FIT()
is sound.

--
Jack Saba <jack@magus.stx.com>
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDL Image Processing Expert Needed
Next Topic: PV-WAVE Libraries

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:44:28 PDT 2025

Total time taken to generate the page: 0.03130 seconds