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

Home » Public Forums » archive » integration in idl
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
integration in idl [message #82607] Sat, 05 January 2013 04:49 Go to next message
gunvicsin11 is currently offline  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 in idl [message #82697 is a reply to message #82607] Mon, 07 January 2013 14:27 Go to previous messageGo to next message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On 1/5/13 6:49 AM, sid wrote:
> 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
>

Unfortunately, there's not a good vectorized way of doing this. You're
going to have to loop through the different values of i.

-Jeremy.
Re: Integration [message #83198 is a reply to message #82607] Wed, 20 February 2013 10:18 Go to previous message
wlandsman is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: K-Mean clustering
Next Topic: Integration

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

Current Time: Wed Oct 08 15:07:33 PDT 2025

Total time taken to generate the page: 0.00576 seconds