# why there is no 0 on the right side? (matlab, low pass filter)

I took even number of sample (in this case 6) from sinc, hamming window, and multiple of those two. then after fourier transform, frequency-domain variables have zero only left side, in this case its x is -pi. I'm wondering why there are no zeros in right side (where x = pi), and has positive value.

here's my work using fourier transfrom

• that's most likely because you have an even number of samples. You can't create perfectly symmetrical signals ( e.g windows, filter kernels etc) using an even number of points. Use an odd number instead. – dsp_user May 27 at 7:58
• my prof asked why even number sample has none-symmetrical output. so.. i have to deal with it. – TAETAE May 27 at 8:04
• We don't normally help with school assignments, at least not until we see what you've tried first. – dsp_user May 27 at 8:18
• its not assignment he told just think about it but never gave a answer. i tried to solve it through fourier transform (using sigma), but i cannot got the answer of both 0 on -pi and +pi. – TAETAE May 27 at 8:25
• i uploaded my work using fourier transform – TAETAE May 27 at 8:26

Answer: Your derivation is absolutely correct and You will see 0 for both $$\omega = -\pi$$ and $$\omega = \pi$$, if you use fvtool() function of MATLAB instead of fft(). The reason is simple : FFT does not calculate values of $$H(e^{j\omega})$$ at continuous $$\omega \in [-\pi, \pi]$$, but it calculates DFT and for that the digital frequency resolution is $$\omega = \frac{2\pi k}{N}$$. So, for $$N=6$$, it will compute values of $$H(e^{j\omega})$$ at $$\omega = 0, \frac{2\pi}{6}, \frac{4\pi}{6}, \frac{6\pi}{6}, \frac{8\pi}{6} \ and \ \frac{10\pi}{6}$$. See that $$\omega = \pi$$ is occurring only at $$k=3$$, and hence you are seeing $$0$$ only once.

For checking this, you can take any symmetrical h, like $$h = {1,2,4,4,2,1}$$. Then use the following MATLAB code to plot its DTFT for $$\omega \in [-\pi, \pi]$$

fvtool(h,1);

This will plot a Single sided DTFT from $$\omega \in [0, \pi]$$. You can then change from "Analysis" option to plot for frequency range $$[-\pi, \pi]$$.

You will get following plot for the example I have taken:

Check that the values are $$0$$ at both $$\omega = -\pi$$ and $$\omega = \pi$$.

And this will happen for any symmetric values, not any particular window function.