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

Home » Public Forums » archive » Curvefit issues
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: Curvefit issues [message #48333 is a reply to message #48198] Fri, 07 April 2006 00:51 Go to previous message
Benjamin Luethi is currently offline  Benjamin Luethi
Messages: 22
Registered: December 2004
Junior Member
Hi,

CURVEFIT assumes that gfunct provides the derivative as well.
Either program it in gfunct or use CURVEFIT with the /NODERIVATIVE option.

Ben


On Fri, 07 Apr 2006 00:16:30 +0200, Jonathan Wolfe
<vorticitywolfe@gmail.com> wrote:

> Hello,
>
> I'm trying to fit a simple 1 parameter function to this data (see below
> A,B); however, I am getting an error message " % GFUNCT: Incorrect
> number of arguments." What's going on? It seems trivial, but I don' see
> where it is faltering. Thanks for the help!
>
> Jon
> ;*********************************************************** ******
> pro test
>
> A=[0.910000, 0.460000, 0.870000,0.740000]
> B=[4.46684,1.99526,28.1838, 11.2202]
>
> weights = A
> weights(*) = 1.0
>
> ;Provide an initial guess of the function's parameters.
> G = 300.0
>
> ;Compute the parameters.
> fit = CURVEFIT(A, B, weights, G, FUNCTION_NAME='gfunct')
>
> PRINT, 'Function parameters: ', G
> END
>
> PRO gfunct, A, G, F
> F = G * A^(2.0)
> end
>



--
-------------+
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Shift (floating point version)
Next Topic: 2D to 3D Array

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

Current Time: Wed Oct 08 17:44:19 PDT 2025

Total time taken to generate the page: 0.00433 seconds