I'm having a hard time to calculate the next function, and I don't really know Matlab good enough to calculate it there. Help would be appreciated:

$$h[n]=\frac{A_1 \cos⁡[\theta_1(n-N/2)]}{n-N/2}$$

  • $\begingroup$ What is $N$? And is $h[n]$ defined for $-\infty<n<\infty$? $\endgroup$
    – Matt L.
    Jul 22, 2020 at 16:18
  • $\begingroup$ A1 = 59 ; N = 297; teta1 = 0.1*pi $\endgroup$ Jul 23, 2020 at 5:52
  • $\begingroup$ Yes, but does $h[n]$ have finite length or is it defined for all $n$? $\endgroup$
    – Matt L.
    Jul 23, 2020 at 6:25
  • $\begingroup$ Its actually a part of calculating DTFT of FIR filter (this is the hd[n] which is multiplied with hamming window), but I wanted to see how does it look like in the frequency domain (DTFT domain). so yes, it is infinite in length. $\endgroup$ Jul 23, 2020 at 11:41
  • $\begingroup$ But if $N$ is even, then $h[n]$ doesn't exist for $n=N/2$. $\endgroup$
    – Matt L.
    Jul 23, 2020 at 12:01

1 Answer 1


The given impulse response is a scaled version of the impulse response of a highpass Hilbert transformer with delay $\tau=N/2$ ($N$ odd) with frequency response


This can be shown as follows:

$$\begin{align}h[n]&=\frac{1}{2\pi}\int_{-\pi}^{\pi}H(e^{j\omega})e^{jn\omega }d\omega\\&=\frac{1}{2\pi}\left[-j\int_{\omega_c}^{\pi}e^{j\omega(n-\tau)}d\omega+j\int_{-\pi}^{-\omega_c}e^{j\omega(n-\tau)}d\omega\right]\\&=\frac{1}{2\pi (n-\tau)}\left[-e^{j\pi(n-\tau)}+e^{j\omega_c(n-\tau)}+e^{-j\omega_c(n-\tau)}-e^{-j\pi(n-\tau)}\right]\\&=\frac{\cos[\omega_c(n-\tau)]-\cos[\pi(n-\tau)]}{\pi(n-\tau)}\tag{2}\end{align}$$

Since for $\tau=(2k+1)/2$, $k\in\mathbb{Z}$, we have $\cos[\pi(n-\tau)]=0$ we arrive at the following inverse DTFT of $(1)$:


  • $\begingroup$ Is there any chance of showing the DTFT (the forward way) of the function h[n]? I understood the IDTFT. $\endgroup$ Aug 27, 2020 at 17:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.