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

Home » Public Forums » archive » Re: Integrated area
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: Integrated area [message #49031] Fri, 09 June 2006 08:04
Julio[1] is currently offline  Julio[1]
Messages: 52
Registered: May 2005
Member
Yes... It does make sense...

Thanks
Julio

Julio escreveu:

> Hi, let me try to explain my question...
>
> Supose I have a curve defined my the vectors x and y:
>
> x=indgen(10)
> y=[0.2, 0.25, 0.34, 0.40, 0.55, 0.60, 0.52, 0.42, 0.30, 0.28]
>
> Now I'm calculating the area of the curve between 2 and 8 (in the x
> axis):
>
> Area=int_tabulated(x[2:8],y[2:8])
>
> This returns me the area below the curve considering y=0, the point
> where x and y crosses. However, I need to calculate the area below the
> curve considering y=0.2. How can I do that... I hope I was clear to
> explain my doubt -:)
>
> Any comments welcome,
>
> Best,
> Julio
Re: Integrated area [message #49033 is a reply to message #49031] Fri, 09 June 2006 06:26 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Julio writes:

> Hi, let me try to explain my question...
>
> Supose I have a curve defined my the vectors x and y:
>
> x=indgen(10)
> y=[0.2, 0.25, 0.34, 0.40, 0.55, 0.60, 0.52, 0.42, 0.30, 0.28]
>
> Now I'm calculating the area of the curve between 2 and 8 (in the x
> axis):
>
> Area=int_tabulated(x[2:8],y[2:8])
>
> This returns me the area below the curve considering y=0, the point
> where x and y crosses. However, I need to calculate the area below the
> curve considering y=0.2. How can I do that... I hope I was clear to
> explain my doubt -:)
>
> Any comments welcome,

Uh, this is probably naive, but if you take the area you
have here, and subtract the area you would get if you
perform the analysis again with y = intarr(10) + 0.2,
wouldn't that be the value you are looking for? :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Roses Blooming
Next Topic: killing non-modal widgets

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

Current Time: Fri Oct 10 11:33:49 PDT 2025

Total time taken to generate the page: 0.32208 seconds