Fourier transform of hamming window function
Show older comments
I want to apply fourier transform onto hamming window but when I use fft function to get fourier transform but it shows graph like showed below. When I referred https://en.wikipedia.org/wiki/Window_function#Hamming_window they show different graph. There is also code attached. Can someone please help me to figure out.
if true
if true
hfft = hamming(framelength);
plot(abs(fft(hfft)));
end
end

Answers (1)
jie li
on 28 Aug 2020
1 vote
framelength = 60
hfft = hamming(framelength);
%hfft = rectwin(framelength);
%hfft = blackman(framelength);
A = fft(hfft, 2048) / (framelength /2);
mag = abs(fftshift(A));
freq = linspace(-0.5, 0.5, length(A));
response = 20 * log10(mag);
% lowvalue = -80;
% response(response < lowvalue) = lowvalue;
plot(freq,response)
Categories
Find more on Fast Fourier Transforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!