LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Average of Cycle Periodic Signal

Hello!

I am reading, from DAQ USB-6009, a periodic signal. Lets imagine that the signal is a periodic triangular wave that I have on an array of N*X elements, in which N is the number of cycles of the wave, X the number of elements of each cycle.

My idea now is to average all this periodic waves!

I want to pic the first value (index=0) of each periodic wave, that is, pic the element 0, 0+X, 0+2X, 0+3X...until 0+NX and calculate the average of this group.

Then I want to do the same for each point of the wave (index=1, 2, 3...X)!

The final result is just one cycle with the same period and the same number of elements (X), but that is the average of all waves!

How can I do this automatic?

Thanks for your answers
Alexandre Ferreira da Silva
0 Kudos
Message 1 of 2
(3,072 Views)
Hi,

There are many ways to do this... here is one, maybe not the best, but quite easy, assuming you know the number of point in a period... Smiley Surprised




1. count how many "entire period" you have in the array
2. extract (in a loop) values from 0 to N-1, then from N-1 to.... and so on
3. build an 2D array of periods

Then you can extract a line to calcute what ever you want on each period or get a column to average all the K-th values.

Hope this helps

Message Edité par TiTou le 11-22-2006 01:07 PM


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 2
(3,063 Views)