フィルターのクリア

Zero mean values but still dominant frequency is zero

5 ビュー (過去 30 日間)
Efstathios Kontolatis
Efstathios Kontolatis 2017 年 6 月 6 日
回答済み: Walter Roberson 2017 年 6 月 6 日
Hello,
I have a series of numbers and I try to find the dominant frequency using FFT. I know that for the FFT to work properly my series should have a mean equal to zero. However even if I impose the mean to be zero, the dominant frequency still remains zero, which is of no interest. Here is my code(a is the array that consists of the series)
a=detrend(a,0);
Fs=67890;
T=1/Fs;
L=1000;
t=(0:L-1)*T;
Y=fft(a);
P2 = abs(Y/L);
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
f = Fs*(0:(L/2))/L;
b=P1/max(P1);
When I plot(f,b) I take this image
which means that zero frequency is still dominant. What am I doing wrong? Or is it impossible to do anything?

回答 (1 件)

Walter Roberson
Walter Roberson 2017 年 6 月 6 日
You appear to be plotting on a truncated log scale. 0 does not appear on your x axis. Your peak is somewhere in the range 0 to 70 Hz.

カテゴリ

Help Center および File ExchangeFourier Analysis and Filtering についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by