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

Home » Public Forums » archive » 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
Poly_Fit [message #85437] Tue, 06 August 2013 12:07 Go to next message
dtakir is currently offline  dtakir
Messages: 4
Registered: August 2013
Junior Member
I'm having a problem using poly_Fit in IDL. It doesn't generate the same coefficients as excel especially for orders > 3? Does anyone know?

result = POLY_FIT(lamk, speck ,4)

Thanks,
Re: Poly_Fit [message #85438 is a reply to message #85437] Tue, 06 August 2013 13:45 Go to previous messageGo to next message
Heinz Stege is currently offline  Heinz Stege
Messages: 189
Registered: January 2003
Senior Member
On Tue, 6 Aug 2013 12:07:29 -0700 (PDT), dtakir@gmail.com wrote:

> I'm having a problem using poly_Fit in IDL. It doesn't generate the same coefficients as excel especially for orders > 3? Does anyone know?
>
> result = POLY_FIT(lamk, speck ,4)
>
> Thanks,

How do you know, that you have a problem with poly_fit? May be, you
habe a problem with Excel.

Cheers, Heinz
Re: Poly_Fit [message #85439 is a reply to message #85437] Tue, 06 August 2013 14:42 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
The output keywords to POLY_FIT can be useful

IDL> result = POLY_FIT(lamk, speck, 4, STATUS=STATUS, YFIT=yfit)

The value of status will tell you if there were any problems encountered during the fit.

You can use the yfit vector to see if the fit makes sense

IDL> plot,lamk,speck
IDL> oplot, lamk, yfit

As noted in the documentation to the STATUS keyword, fitting problems -- especially if they only occur when fitting high orders -- can often be solved by doing everything in double precision.

--Wayne


On Tuesday, August 6, 2013 3:07:29 PM UTC-4, dta...@gmail.com wrote:
> I'm having a problem using poly_Fit in IDL. It doesn't generate the same coefficients as excel especially for orders > 3? Does anyone know?
>
>
>
> result = POLY_FIT(lamk, speck ,4)
>
>
>
> Thanks,
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: help with curve fitting
Next Topic: SET_VALUE for WIDGET_TABLE seem to be ignored - any ideas why?

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

Current Time: Wed Oct 08 13:47:30 PDT 2025

Total time taken to generate the page: 0.00429 seconds