How to read this
Time domain (left). The ideal response hd[n] is a sinc that never ends. The window keeps L samples centred on n = 0 and tapers them; the shaded band is where it is nonzero. Their product h[n] is the filter.
Frequency domain (right). Multiplying by w[n] convolves the brick wall with W(ejω). Tick “Slide W across Hd” to see that convolution at one frequency ω0: the window's spectrum is centred on ω0, and the shaded overlap with the passband is proportional to H(ejω0). Press Sweep to trace all of H.
What sets what. The main lobe smears each cutoff into a transition band about one main lobe wide, so a longer window gives a sharper filter. The sidelobes leak the passband into the stopband, so the ripple and attenuation depend on the window's shape, not on L. That is why a longer rectangular window still overshoots by about 9% (the Gibbs phenomenon), and why the cutoff always sits near −6 dB, halfway down.
Measurements. Main-lobe width is null to null; peak sidelobe is relative to W(ej0). For the filter, the ripple δp and δs are the largest errors beyond the first ripple next to each cutoff; the transition width runs from where the passband error first reaches δp to where the stopband error first reaches δs; attenuation is −20 log10 δs.
Conventions. Windows match MATLAB's symmetric rectwin, bartlett, hanning, hamming, kaiser, gausswin, blackman, nuttallwin, blackmanharris, chebwin and flattopwin. L is odd (type I linear phase), so all four filter types work. H is shown as the real, zero-phase amplitude of h[n] centred on n = 0; the causal filter h[n − (L−1)/2] has the same magnitude and a linear phase of −ω(L−1)/2. Exported coefficients are in causal order.