integration in idl [message #82607] |
Sat, 05 January 2013 04:49  |
gunvicsin11
Messages: 93 Registered: November 2012
|
Member |
|
|
Hello everyone,
I have to do integration for this equation
f=I(i,x)*costheta(x)*sintheta(x)
x is the limit from 0 to 90
this i in the above equation also varies from 0 to 35 values.
so result f should be an array.
How to do the integration for this kind of array.
I wrote a function
and used qromb for integration but it didnt work.
this array is creating problem and I couldnt solve it. Please do help me out in this case.
thanking you in advance,
sid
|
|
|
|
Re: Integration [message #83198 is a reply to message #82607] |
Wed, 20 February 2013 10:18  |
wlandsman
Messages: 743 Registered: June 2000
|
Senior Member |
|
|
On Wednesday, February 20, 2013 12:00:32 PM UTC-5, fd_...@mail.com wrote:
> Hi all
>
>
>
> I have a question about integration.
>
>
>
It's not clear from your post whether you have tabulated data - a set of X,Y values -- or a known function. (DERIV works on tabulated data, but you give a function Y=2T.) For tabulated data, I suggest the Exelis procedure INT_TABULATED. But if you can write the IDL function, then it is possible to integrate with more accuracy since the function can be evaluated at any X value. In that case I suggest Craig Markwardt's QPINT1D
http://cow.physics.wisc.edu/~craigm/idl/down/qpint1d.pro
although there are several other good IDL integrators around. --Wayne
> I used the DERIV function in order to differentiate a function. Now I want to integrate a function but don't know which function to this work. I want a function that do the same work as the DERIV function but in the "opposite direction". E.g. Assume Y=2t, the integral of DERIV(t,Y) equals Y=2t (which is obvious I think).
>
>
>
> Cheers
>
> M
|
|
|