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 #67309 is a reply to message #67308] Sat, 11 July 2009 09:43 Go to previous message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
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...
[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 Oct 11 14:35:52 PDT 2025

Total time taken to generate the page: 1.27768 seconds