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

Home » Public Forums » archive » Re: An approximation of the cumulative integral of Y
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: An approximation of the cumulative integral of Y [message #67303 is a reply to message #67302] Sun, 12 July 2009 12:40 Go to previous messageGo to previous message
Chris[6] is currently offline  Chris[6]
Messages: 84
Registered: July 2008
Member
On Jul 12, 5:58 am, Vijay Shah <vijayps...@gmail.com> wrote:
> Hi Vince,
> Thanks for the info.
> I checked the int_tabulated. But the IDL help files indicate  "Data
> that is highly oscillatory requires a sufficient number of samples for
> an accurate integral approximation."
> I am not sure for 10 to 12 samples what would work best. I will search
> google to find more information on this. If you know of any paper
> about comparison, please feel to send it.
>
> Regards,
> Vijay
>
> On Jul 11, 1:07 pm, Vince Hradil <vincehra...@gmail.com> wrote:
>
>> On Jul 11, 11:43 am, Vince Hradil <vincehra...@gmail.com> wrote:
>
>>> On Jul 11, 12:39 am, Vijay Shah <vijayps...@gmail.com> wrote:
>
>>>> Hi,
>>>> Is there any subroutine in IDL that allows to computes an
>>>> approximation of the cumulative integral of Y via the trapezoidal
>>>> method (with unit spacing)?
>
>>>> Regards,
>>>> Vijay
>
>>> INT_TABULATED() works nicely (not really what you want, but better?)
>
>>> It would be easy enough to write using SHIFT().  Something like
>
>>> y2 = (y+shift(y,1))/2
>>> x2 = (x+shift(x,1))/2
>>> integral = total(x2*y2); or total(x2*y2,/cumulative)
>
>>> You have to figure out how to deal with the "ends" from the shift...
>
>> Let's see, I think that should be:
>> x2 = x-shift(x,1)
>> or use delta x if it doesn't change
>
>

Check out
http://idlastro.gsfc.nasa.gov/ftp/pro/math/qtrap.pro

Chris
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Menu Question
Next Topic: Re: Call external 64bit

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

Current Time: Sat Nov 29 20:47:32 PST 2025

Total time taken to generate the page: 0.56203 seconds