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

Home » Public Forums » archive » MPFITFUN Problem
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: MPFITFUN problem [message #81239 is a reply to message #44896] Tue, 28 August 2012 07:54 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Tuesday, August 28, 2012 7:43:11 AM UTC-4, Rui She wrote:
> Hi,
>
> I met a problem, when I used MPFITFUN.pro to fit a base of data using a user function, the procedure gave a error as:
>
> % MPFIT: Error detected while calling mpfitfun_eval:
>
> % MPFIT: Array dimensions must be greater than 0.
>
> % MPFIT: Error condition detected. Returning to MAIN level.
>
> % MPFITFUN: Error detected while calling mpfitfun_eval: Array dimensions must be greater than 0.
>
>
>
> I believe my user function was right, and I met this problem sometimes(not all data, error occurred about every 50 case), what's more, if I changed the start value of the parameters, it usually got to normal. So I think this may be a hidden bug of the MPFIT.
>
> Or someone has good idea?

I am 99% certain the error is happening inside of your user function. It's probably at the point where you create an array with fltarr() or dblarr() or make_array().

Here's a well-kept secret. You can call MPFITFUN() with the /NOCATCH keyword set. When NOCATCH is set, MPFITFUN will not try to trap any errors, and IDL will break at the location of the error. Then start debugging.

Craig
[Message index]
 
Read Message
Read Message
Previous Topic: Abstruse Goose on Computers
Next Topic: "Expression Must be a Scalar in this context:" error in nlinlsq function

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

Current Time: Fri Oct 10 11:28:37 PDT 2025

Total time taken to generate the page: 0.08363 seconds