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

Home » Public Forums » archive » Re: Error detected while calling MPFIT_FDJAC2
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: Error detected while calling MPFIT_FDJAC2 [message #71489 is a reply to message #71488] Tue, 22 June 2010 21:47 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Jun 22, 5:40 am, Fermiona Fermiona <fermion...@gmail.com> wrote:
> Hello Dr. Craige,
>
> I didn't compute the derivatives. The user function returnes the
> residual:
>
> FUNCTION LinearFit, p, X=x, Y=y, ERR=err, $
>                     perror=perror, bestnorm=bestnorm, dof=dof
>
>     model = p[0]+p[1]*x
>     resid = (y-model)/err
>
>     return, resid
> END
>
> and inside the procedure, I had:
>
> p0 = [51.0,-0.5]
> args = {X:x_n, Y:y_n, ERR:yerr}
> fit_res = mpfit('LinearFit', p0, functargs=args,perror=perror,
> bestnorm=bestnorm, dof=dof)
>
> The first time I called mpfit outside of the loop, there was no
> error.
> When mpfit was called again, from inside the loop this time, I got the
> error I mentioned.
>

I'm guessing what "inside" and "outside" of a loop might mean.

Forgetting a loop, does your experience mean that you can call MPFIT
with some arguments a first time, and it works; and then you do it
again with *exactly* the same arguments and it fails? That would be
odd.

Or, do you mean you are calling MPFIT recursively?

Craig
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: linear interpolation to form a deformation field
Next Topic: IDLDoc + HTML

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

Current Time: Wed Oct 08 19:35:30 PDT 2025

Total time taken to generate the page: 0.00430 seconds