Finding an average of a signal using Fast Fourier Transform?

stevenphy2
Messages
10
Reaction score
0
Hi all,
I have discrete data of a signal but I do not know the periods of the signal.
The signal is like a "beat" I guess, but not really sure.
I plan to use fft in MATLAB to get it's frequency spectrum and get the 0Hz value as the average of the signal.
Is this a bad idea?
Any other ways to do this?
Thanks.
 
Physics news on Phys.org
If you really want to know only average of the signal, you can simply add all the values of your signal (discrete data) and divide by total number of samples. Why to take fft? Anyway fft also does exactly the same thing to find value at 0Hz.
 
n.karthick said:
If you really want to know only average of the signal, you can simply add all the values of your signal (discrete data) and divide by total number of samples. Why to take fft? Anyway fft also does exactly the same thing to find value at 0Hz.

Adding them and divide it by the total number of samples will work only if my signal is of complete periods, right?
For example, if my full signal is a cosine wave, but I just have data that are half of the wavelength, it will not give me an average of zero.
I am wondering if there is something that can generate a "meaningful average" even if I do not have exactly complete wavelengths, say I have 5.5 wavelengths..?
 
stevenphy2 said:
Adding them and divide it by the total number of samples will work only if my signal is of complete periods, right?
For example, if my full signal is a cosine wave, but I just have data that are half of the wavelength, it will not give me an average of zero.

Yes you are right. I think, you should first find the fundamental period of your signal (in case you don't know). Once you know that, you can find average of your signal from the samples of one period.
 
Hi all, I've been a roulette player for more than 10 years (although I took time off here and there) and it's only now that I'm trying to understand the physics of the game. Basically my strategy in roulette is to divide the wheel roughly into two halves (let's call them A and B). My theory is that in roulette there will invariably be variance. In other words, if A comes up 5 times in a row, B will be due to come up soon. However I have been proven wrong many times, and I have seen some...
Thread 'Detail of Diagonalization Lemma'
The following is more or less taken from page 6 of C. Smorynski's "Self-Reference and Modal Logic". (Springer, 1985) (I couldn't get raised brackets to indicate codification (Gödel numbering), so I use a box. The overline is assigning a name. The detail I would like clarification on is in the second step in the last line, where we have an m-overlined, and we substitute the expression for m. Are we saying that the name of a coded term is the same as the coded term? Thanks in advance.

Similar threads

Back
Top