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

Home » Public Forums » archive » Re: Numerical integration
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
Re: Numerical integration [message #56801] Thu, 15 November 2007 13:37
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
tarequeaziz@gmail.com wrote:
> Hello Gurus,Pundits& Bosses of IDL,
>
> Need help on 'int_tabulated'. One of the array has duplicate
> elements(=same elements) and thus int_tabulated refuses to move any
> further.
>
> Is there any way out?

what about cutting your array where you have an X duplicate, then run
int_tabulated on each sub-array, and sum everything up at the end?

Jean
Re: Numerical integration [message #56803 is a reply to message #56801] Thu, 15 November 2007 13:00 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Nov 15, 2:58 pm, tarequea...@gmail.com wrote:
> Hello Gurus,Pundits& Bosses of IDL,
>
> Need help on 'int_tabulated'. One of the array has duplicate
> elements(=same elements) and thus int_tabulated refuses to move any
> further.
>
> Is there any way out?

So you have a jump in your function (where Y changes but X stays the
same)? INT_TABULATED won't like this because it interpolates the
data, and your function is not smooth. You could try just a
simple trapezoidal integration, such as in the function
http://idlastro.gsfc.nasa.gov/ftp/pro/math/tsum.pro

--Wayne
Re: Numerical integration [message #56805 is a reply to message #56803] Thu, 15 November 2007 12:55 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
tarequeaziz@gmail.com wrote:
> Hello Gurus,Pundits& Bosses of IDL,
>
> Need help on 'int_tabulated'. One of the array has duplicate
> elements(=same elements) and thus int_tabulated refuses to move any
> further.
>
> Is there any way out?

Yes. Remove the duplicate x-values and try again.

cheers,

paulv



>
> I tried QROMB, QSIMP etc. I can not use them because to do that I need
> to define a 'function' which they integrate. I can not make a function
> out of my 2 arrays (at least that's what I think).
>
> However,the thing I like about them is that, you can specify step
> size, which cant be done in int_tabulated.
>
> Is there any procedure/function which can handle 1) repeatable
> elements or same elements in array and also 2) can specify step size.
>
> Any help will be greatly appreciated.
>
> Thanks in advance.
>
> Best,
>
> TA
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: reduce width of a blank
Next Topic: Re: version 7

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

Current Time: Wed Oct 08 13:55:47 PDT 2025

Total time taken to generate the page: 0.00576 seconds