function h = hannwin(n)

q=0:(n-1);

h = 0.5 * (1 - cos((2*pi.*q)./(n-1)));


end