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

Home » Public Forums » archive » QROMB and parameters
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
QROMB and parameters [message #34043] Thu, 13 February 2003 06:18 Go to next message
mikko.inkinen is currently offline  mikko.inkinen
Messages: 1
Registered: February 2003
Junior Member
I would like know what is the best way of using a function with
parameters when integrating with QROMB. I tryed to save parameters in
procedure (SAVE,a,b,FILENAME='a_b.txt') and restore them in function
(restore,'a_b.txt') where a and b are used, but this doesn't seem to
work as it should.

What is the best and recommended practise to handle this quite simple
thing with IDL?
Re: QROMB [message #39879 is a reply to message #34043] Tue, 15 June 2004 15:05 Go to previous message
Craig Markwardt is currently offline  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
------------------------------------------------------------ --------------
Re: QROMB [message #39881 is a reply to message #34043] Tue, 15 June 2004 13:06 Go to previous message
mmeron is currently offline  mmeron
Messages: 44
Registered: October 2003
Member
In article <162586e3.0406150744.514aba92@posting.google.com>, biomedthesis2002@yahoo.com (New2IDL) writes:
> 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.
>
The integral *is* a single value. Unless you mean an indefinite
integral (say, from 0 to x, for various values of x). Is this the
case?

Mati Meron | "When you argue with a fool,
meron@cars.uchicago.edu | chances are he is doing just the same"
Re: QROMB [message #39887 is a reply to message #34043] Tue, 15 June 2004 08:57 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
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

paulv
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: range ordering of triangular facets
Next Topic: Java and IDL

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

Current Time: Sat Oct 11 07:40:27 PDT 2025

Total time taken to generate the page: 0.96228 seconds