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

Home » Public Forums » archive » More problems with Curvefit
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: More problems with Curvefit [message #35715 is a reply to message #35619] Mon, 30 June 2003 10:17 Go to previous messageGo to previous message
the_cacc is currently offline  the_cacc
Messages: 104
Registered: October 2001
Senior Member
1) You should put 'fit_funct' at the top of the file so it compiles
first.
2) Change "W = 1.0" to "W = replicate(1.0,12)"
3) pder should be the partial deriv wrt the parameters A - ie.
pder[*,0] = X * EXP(-A[0]*X) and pder[*,1] = X * EXP(-A[1]*X).
4) Looking at your data (PLOT,x,y), it seems that the choice of
fitting function is unlikely to fit well... ever. You need to allow
for a constant offset - the value 9 looks "right". If you can be sure
it is 9, then simply change y to y+9 in the call to curvefit.
5) To see the fit add this line at the end of your code: PLOT,x,y &
fit_funct,x,a,f & OPLOT,x,f-9.

Hope this gives you somewhere to start. I recommend changing your fit
function to deal with the offset issue. More generally, I would also
recommend looking at AMOEBA for fitting a small number of parameters -
very stable, doesn't need derivatives and not fussy about
discontinuities etc.

Ciao.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Format Code Question
Next Topic: IDL from crontab going defunct?

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

Current Time: Wed Oct 08 18:40:02 PDT 2025

Total time taken to generate the page: 0.02074 seconds