Filter löschen
Filter löschen

fft function whether to take average of data before plotting it

3 Ansichten (letzte 30 Tage)
Sag
Sag am 25 Feb. 2016
Beantwortet: Star Strider am 25 Feb. 2016
What would be more appropriate
  1. Running fft on average values from data and then plotting it
  2. Running fft on data and then taking average and plotting it
I have a matrix 18x2500. Each row is a trial. I wonder if I should take average of data (a row vector 1x2500) and then run fft function or I should run fft function row wise and then take mean of the resultant matrix (again a row vector) and then plot it?

Antworten (2)

Image Analyst
Image Analyst am 25 Feb. 2016
The fft of a constant (the average) is a delta function so I don't think that's what you want.
Taking the fft of some varying data will give you the spectrum, and then if you take the average of the whole spectrum, you'll get the average power over all frequencies, which will be a constant.
So I don't think either option you suggested gives very interesting or useful results.
  1 Kommentar
Sag
Sag am 25 Feb. 2016
Thanks for the reply. So after getting fft of the matrix mentioned above, what would be the best way of representing it?

Melden Sie sich an, um zu kommentieren.


Star Strider
Star Strider am 25 Feb. 2016
I agree with Image Analyst. Taking the average of the fft or taking the fft of the average completely destroys its utility and gives you no useful information. Just take the average of your data in the time (or space) domain, forget the fft and be done with it.
If you want to subtract the mean of the data before taking the fft, that can be useful in eliminating a large d-c offset that can make other frequency components more difficult to see. It does not affect the magnitude of the other frequency components of the fft, so you lose no substantive information.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by