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

Home » Public Forums » archive » QSIMP function
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: QSIMP function [message #85832 is a reply to message #85831] Thu, 12 September 2013 10:05 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
One suggestion for improved accuracy is to interpolate your function at the midpoints of all your tabulated X values. You can use one of the options (e.g. spline,least-squares quadratic) in the INTERPOL() function without needing a loop. Then redo your trapezoidal integration routines but using twice as many points, then rebin your final answer by a factor of two.


On Thursday, September 12, 2013 11:58:40 AM UTC-4, fd_...@mail.com wrote:
>> So you don't want the area under a curve, but you want to get the area (estimated by a trapezoid) covered by consecutive points. Then the code you posted earlier is fine.
>
>
>
> The code for trapezoidal that I posted earlier it does not work very well, I have an underestimation because my data changes fast. That is why I am looking for an alternative method.
>
>
>
>> I presume you have millions of points if you are worried about using a FOR loop.
>
>
>
> Yeah because it takes me long time with a FOR loop.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Widget programing - Please help!
Next Topic: The IDL library for Shuffled Complex Evolution (SCEUA)

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

Current Time: Fri Oct 10 12:33:47 PDT 2025

Total time taken to generate the page: 0.40358 seconds