how to calculate central frequency from fft of wave function
조회 수: 1 (최근 30일)
이전 댓글 표시
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)
댓글 수: 0
답변 (2개)
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))
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.
댓글 수: 0
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!