Re: QROMB [message #39879 is a reply to message #34043] |
Tue, 15 June 2004 15:05   |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
Paul Van Delst <paul.vandelst@noaa.gov> writes:
> New2IDL wrote:
>> hi,
>> The function I am trying to integrate is :
>>
>> F(x) = a*exp(-b*(x^2))
>>
>> where: a and b are parameters
>> x ranges from 0,20
>>
>> We have experimental data to fit with the above integral (a and b as
>> parameters to be found from fit).
>>
>> When I tried to integrate the above mentioned funciton with QROMB we
>> get a single value as the answer. I cannot fit this value to my data.
>>
>> Can anybody please help me to get the F(x) value for each value of X.
>
> If you want to fit the data, why are you integrating it? Check out Craig Markwardt's IDL
> fitting package MPFIT at
> http://cow.physics.wisc.edu/~craigm/idl/fitting.html
Thanks for the plug Paul, but I think the original poster wants to fit
the integrated function, i.e., the *antiderivative*, to the data.
The antiderivative of the gaussian function is the error function, or
ERF() / ERRORF() in IDL, so the answer is built into IDL already. One
needs to take care, since there is a simple change of variables from
the IDL function to the one that "New2IDL" wants.
And of course I recommend MPFIT for the actual fitting :-)
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|