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

Home » Public Forums » archive » Re: 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: Problems with curvefit [message #8476] Wed, 12 March 1997 00:00
brian.jackel is currently offline  brian.jackel
Messages: 23
Registered: May 1996
Junior Member
In article <33267B6E.540@igi.pd.cnr.it> Emilio Martines <martines@igi.pd.cnr.it> writes:


> Hello. I am using curvefit in IDL 4.0.1 for fitting a set of data point
> with a curve of the form
> y=a*(exp((x-b)/c)-1)
> where x is the dependent variable and a,b,c are the fit parameters.
> It usually works fine, but sometimes, when the data are really bad, it
> goes into an infinite loop. Since the fit is embedded into a more
> complex program, this is very annoying. I would rather like the routine
> to exit nicely, even without performing the fit. Has anyone found the
> same problem? Is there a solution? Thanks a lot.

I've run across a problem with Curvefit, due to the use of a "repeat"
loop terminates with the following condition

endrep until chisqr le chisq1

that is not always met. By adding some kind of counter

nreps= nreps + 1

inside the loop, and checking for it

endrep until (chisqr le chisq1) or (nreps ge 6)

an exit can be forced. Not a great fix, but it seems to work.
There have been some minor changes to Curvefit in version
5.0, but the problem with the repeat loop is still there.

Brian Jackel
[Message index]
 
Read Message
Previous Topic: VMS Segmented Fortran Files
Next Topic: Click here for Extreme Net Toolz

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

Current Time: Fri Oct 10 03:29:45 PDT 2025

Total time taken to generate the page: 1.60111 seconds