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 #58470 is a reply to message #58469] Thu, 31 January 2008 08:17 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
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
[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 08:02:53 PDT 2025

Total time taken to generate the page: 1.28153 seconds