[edit] Summary
Description |
Bartlett-Hann window and frequency response
|
Source |
self-made
|
Date |
15-Dec-2005
|
Author |
Bob K
|
Permission
(Reusing this image) |
see below
|
source: http://en.wikipedia.org/wiki/Window_Function
author: http://en.wikipedia.org/wiki/User:Bob_K
[edit] Matlab commands
N=128;
k=0:N-1;
dr = 100;
w = 0.62 -0.48*abs(k/(N-1) -0.5) +0.38*cos(2*pi*(k/(N-1) -0.5));
B = N*sum(w.^2)/sum(w)^2 % noise bandwidth (bins)
H = abs(fft([w zeros(1,7*N)]));
H = fftshift(H);
H = H/max(H);
H = 20*log10(H);
H = max(0,dr+H);
figure
area(k,w,'FaceColor', [0 .4 .6])
xlim([0 N-1])
set(gca,'XTick', [0 : 1/8 : 1]*(N-1))
set(gca,'XTickLabel','0| | | | | | | |N-1')
grid on
ylabel('amplitude')
xlabel('samples')
title('Window function (Bartlett-Hann)')
figure
stem(([1:(8*N)]-1-4*N)/8,H,'-');
set(findobj('Type','line'),'Marker','none','Color',[.871 .49 0])
xlim([-4*N 4*N]/8)
ylim([0 dr])
set(gca,'YTickLabel','-100|-90|-80|-70|-60|-50|-40|-30|-20|-10|0')
grid on
ylabel('decibels')
xlabel('DFT bins')
title('Frequency response (Bartlett-Hann)')
[edit] Licensing
[edit] Improvements
Click on a date/time to view the file as it appeared at that time.
The following pages on the English Wikipedia link to this file (pages on other projects are not listed):