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

Home » Public Forums » archive » polynomial fitting(second degree)
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
polynomial fitting(second degree) [message #70834] Mon, 10 May 2010 11:36
sid is currently offline  sid
Messages: 50
Registered: January 1995
Member
Hi,
I am having wavelength in x axis from say c=(3933.2002 ,...
3933.4724) and intensity in y axis from say d
=(0.085022407,.....0.081581624,.....,0.085993795).
Now I did res=poly_fit(c,d,2)
then, x=(-res(1)/(2*res(2) which should give the site of minimum
value, but instead im getting some very weird answer as 4410.8199. I
calculated y = res(0) + res(1)*x + res(2)*x^2 which should give the
minimum value but it is also obviously weird.
But the same procedure if I proceed with c=dindgen(78)(that is the
number of wavelength values initially in c).
Then if I do res=poly_fit(c,d,2)
then i did x=(-res(1)/(2*res(2) and y = res(0) + res(1)*x +
res(2)*x^2, in this way im getting resonable x and y value.

Why it happens and please help me to get the correct solution, even if
i do the same with the wavelength values.
regards
sid
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Polygon Smoothing
Next Topic: Re: Why there is no cot function in IDL

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

Current Time: Wed Oct 08 20:02:10 PDT 2025

Total time taken to generate the page: 0.00452 seconds