Poly_Fit [message #85437] |
Tue, 06 August 2013 12:07  |
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 #85439 is a reply to message #85437] |
Tue, 06 August 2013 14:42  |
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,
|
|
|