% Plot of generalized Hamming windows N=100; n=(0:N-1)'; alpha=linspace(0,0.5,11)'; h=[]; for i=1:length(alpha), h = [h, (1-alpha(i))-alpha(i)*cos(2*pi*n/(N-1))]; end plot(h); title('Generalized Hamming Window: (1-\alpha)-\alpha*cos(2\pin/(N-1)), 0\leqn\leqN-1'); legendStr={}; for i=1:length(alpha), legendStr={legendStr{:}, ['\alpha=', num2str(alpha(i))]}; end legend(legendStr);