# Discrete Signal Windowing

How do we apply windowing of 50% (4 samples) to a discrete signal with the odd number of values as 1234567?

Is it done as: 1234 3456 567(0) or 1234 3456 67(0)(0)?

• Are you referring to 50% overlap? If so your first version is correct as it maintains that overlap but your second one does not. Sep 28, 2020 at 2:27
• @DanBoschen yes talking about 50% overlap Sep 28, 2020 at 3:57
• what would you do if the samples were 12345678? And then consider if the value for sample 8 was 0 Sep 28, 2020 at 4:00
• Yes, it would be like: 1234 3456 5678 then transform to: 1234 3456 567(0), so it's the first, thanks. Sep 29, 2020 at 23:16

Depending on the window function, you may be able to use a DFT-even version of the window function. "DFT-even" means that the periodic extension of the window function is symmetrical. In MATLAB and Octave you can get such a window like this (the first line in the source code):

a = hanning(10, "periodic");
b = fftshift(a);
c = a + b;
plot(a, "x", b, "o", c, "+");


Figure 1. DFT-even Hann window (blue x), shifted DFT-even Hann window (red o) and their sum (orange +).

The window function and the shifted window function have in some sense a 50 % overlap, and they sum to a constant, which I think was the desired quality that the 50 % overlap was though to facilitate.

Not a problem in the above, but if the window function is such that it does not end at a zero value, and the start and the end values are not equal, then one possibility would be to move one half of the value of the last sample to just before the first sample.

• Nice Olli. And we should note that most higher performance windows require much more overlap to achieve this unity (75% typical). Sep 28, 2020 at 18:16
• @DanBoschen yep it depends on the window function. For window functions made of cosine terms, see this answer for the overlap that gives a constant sum. Sep 28, 2020 at 18:57