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

Home » Public Forums » archive » Re: MPCURVEFIT argument error
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: MPCURVEFIT argument error [message #74901] Fri, 04 February 2011 08:36
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
On Feb 4, 11:19 am, Josh Fuchs <fuchs.j...@gmail.com> wrote:
> Using MPCURVEFIT, I am getting the following error:
>
> % MPFIT: Error detected while calling MPFIT_FDJAC2:
> % MPFIT: POLY2: Incorrect number of arguments.
> % MPFIT: Error condition detected. Returning to MAIN level.
> % MPCURVEFIT: Error detected while calling MPFIT_FDJAC2: POLY2:
> Incorrect number of arguments.
>
> POLY2 is the function name called with MPCURVEFIT. POLY2 is a
> procedure based on POLY. I wrote POLY2 based on the following
> documentation for MPCURVEFIT, to make sure I did have the correct
> number of arguments:
>
> ;  The user must define a function which returns the model value.  For
> ;  applications which use finite-difference derivatives -- the default
> ;  -- the user function should be declared in the following way:
> ;
> ;    PRO MYFUNCT, X, P, YMOD
> ;     ; The independent variable is X
> ;     ; Parameter values are passed in "P"
> ;     YMOD = ... computed model values at X ...
> ;    END
> ;
> ;  The returned array YMOD must have the same dimensions and type as
> ;  the "measured" Y values.
>
> Any thoughts about this? Thanks.

well either your poly2 does not have the right number of arguments
(double check that) or the version of poly2 that is compiled
is not what you think it is (explicitly compile it).

Try calling poly2 manually supplying x,p,ymod - does that work?

Ciao,
Paolo
[Message index]
 
Read Message
Previous Topic: MPCURVEFIT argument error
Next Topic: Multiple Coyote Directories

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

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

Total time taken to generate the page: 0.28683 seconds