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

Home » Public Forums » archive » Re: Speaking of curve fitting...
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Speaking of curve fitting... [message #58469 is a reply to message #58468] Thu, 31 January 2008 08:33 Go to previous messageGo to previous message
lasse is currently offline  lasse
Messages: 48
Registered: February 2007
Member
On 31 Jan, 17:17, Paul van Delst <Paul.vanDe...@noaa.gov> wrote:
> Lasse Clausen wrote:
>> ... run the following code, spot the difference and explain, s'il vous
>> plait.
>
>> nn = 1000
>> xx1 = dindgen(nn)
>> xx2 = timegen(nn, start=julday(5,25,1980,11,23))
>
>> yy1 = sin(2.*2.*!pi*xx1/(nn-1.))
>
>> d = poly_fit(xx1, yy1, 6, yfit=yfit1, /double)
>> d = poly_fit(xx2, yy1, 6, yfit=yfit2, /double)
>
> Try
> d = poly_fit(xx2-xx2[0], yy1, 6, yfit=yfit2, /double)
>
>
>
>> !p.multi = [0,1,2]
>> plot, xx1, yy1, /xstyle
>> oplot, xx1, yfit1, linestyle=1
>> plot, xx2, yy1,/xstyle
>> oplot, xx2, yfit2, linestyle=1
>
>> end
>
>> I had a quick look at POLY_FIT.PRO but I can spot nothing which could
>> explain the above behaviour. I run 32bit IDL 6.4 on some Linux.
>
>> Cheers
>> Lasse Clausen

Yes, that is indeed a workaround. But isn't that still a bug in
POLY_FIT? Surely the result of the fitting must not depend on an
arbitrary offset of the independent variable.

Cheers
Lasse Clausen
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Speaking of curve fitting...
Next Topic: REGRESS with intercept 0

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

Current Time: Sat Oct 11 15:09:36 PDT 2025

Total time taken to generate the page: 1.51294 seconds