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 #67308 is a reply to message #67304] Sat, 11 July 2009 10:07 Go to previous messageGo to previous message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
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
[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: Wed Oct 08 20:13:56 PDT 2025

Total time taken to generate the page: 0.02542 seconds