Area positive and negative

Hello!

I have a wave that fluctuates around y=0. And I want to know the area of the wave under/over the curve at a specific time window, divided by the size of the time window.

I thought faverage was doing this, but in fact faverage is giving the same results than the V_avg while using wavestats.

Is there any function in Igor doing this?

Thanks!!


PS1: I'm attaching an image showing in blue the absolute area values I want to calculate

PS2: Excuse me if I'm asking something very trivial, but I've been reading the help for "Area", "faverage" and "Integral1D", and the forum but still cannot find an answer.
Hello Eugenia,

Is there any reason why you would not use the Area() function? Suppose your curve represents the data in wave1 and you want to find the area between x=a and x=c:
Variable areaAC=area(wave1,a,c)

Note that the area under the curve (assuming zero crossing axes) is going to have a negative sign so if you want the absolute total area you should combine the absolute value of the areas from [a,c] and [c,b].
Also note that if your curve is described by a pair of waves there is an analogous function areaXY().

I hope this helps,

A.G.
WaveMetrics, Inc.

Igor wrote:

Is there any reason why you would not use the Area() function? Suppose your curve represents the data in wave1 and you want to find the area between x=a and x=c:
Variable areaAC=area(wave1,a,c)

Note that the area under the curve (assuming zero crossing axes) is going to have a negative sign so if you want the absolute total area you should combine the absolute value of the areas from [a,c] and [c,b].


Thanks for your answer. The waves in which I want to calculate the area are crossing multiple times the zero axis... so doing: abs(area(wave1,x1,X2)) + abs(area(wave1,X2,X3)) +..+ abs(area(wave1,Xn,Xm)) being Xn all the times the wave1 crosses zero is kind of long and a pain, that's why I was wondering if there was any function already doing this.

I hope it exists!!!

I would make a new wave with absolute values of wave1, then find the area of that wave. Maybe something like this:
MatrixOP abswave1 = abs(wave1)
print area(abswave1)


John Weeks
WaveMetrics, Inc.
support@wavemetrics.com