how to calculate central frequency from fft of wave function

2 ビュー (過去 30 日間)
kavya saxena
kavya saxena 2012 年 5 月 24 日
hi all, is there any difference between central freq and maximum freq of a wave function. how i can calculate central frequency of this function using fft in matlab y=0.5(1-cos(2*pi*f*t)*sin(2*pi*f*t)

回答 (2 件)

Wayne King
Wayne King 2012 年 5 月 24 日
Are you trying to show us an AM signal? If so, are the two f's really the same frequency, or did you mean something like this:
t = 0:1e-4:1-1e-4;
f0 = 50;
fc = 1e3;
y=0.5*(1-cos(2*pi*f0*t)).*sin(2*pi*fc*t);
ydft = fft(y);
ydft = ydft(1:length(y)/2+1);
freq = 0:1e4/length(y):1e4/2;
plot(freq,abs(ydft))
  1 件のコメント
kavya saxena
kavya saxena 2012 年 5 月 24 日
these two are same frequency. let it wiil be 20Khz then i did
f=20e3;
fs=f*100;
ts=1/fs;
n=3;
t=0:ts:n/f;
y=0.5*(1-cos(2*pi*f*t)).*sin(2*pi*f*t);
ydft = fft(y);
now how i get central freq?

サインインしてコメントする。


Wayne King
Wayne King 2012 年 5 月 24 日
It appears to me that just rewriting that using trigonometric identities you see that it equals
1/2*sin(2*pi*f*t)-1/4*sin(2*pi*2*f*t)
So you get a line component at 20 kHz and one at 40 kHz with 1/2 the amplitude of the component at 20 kHz.
freq = 0:fs/length(y):fs/2;
ydft = fft(y);
ydft = ydft(1:ceil(length(y)/2));
plot(freq,abs(ydft))
So I'm guessing you call the center frequency 30 kHz.

カテゴリ

Help Center および File ExchangeDirection of Arrival Estimation についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by