[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
POLY_FIT gives wrong answer !
- Subject: POLY_FIT gives wrong answer !
- From: Henk Schets <Henk.Schets(at)oma.be>
- Date: Tue, 09 May 2000 13:38:42 +0200
- Newsgroups: comp.lang.idl-pvwave
- Organization: IRM-KMI
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:19502
Maybe all of you already know this, but I didn't and I could not find
any documentation about it.
The problem : I have two long arrays (x- and y-values) and I made
subarrays out of them by using an array as subscript, like
x = fltarray(l)
y = fltarray(l)
indexarr = longarray(l)
(you know, the way to sort different arrays together)
However, when I do something like out =
poly_fit(x[indexarr],y[indexarr]), the outcome is simply wrong ! I know
this because other programs gave another solution (all the same).
The only way to do it right is by making other arrays like x2 and y2 and
doing a poly_fit on it.
Is this a known issue ?
Royal Meteorological Institute of Belgium (R.M.I.B.)
Tel: (+32) 2 3730597
Fax: (+32) 2 3751259
WWW server: http://www.meteo.oma.be/IRM-KMI