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}$$
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It only takes a minute to sign up.
Sign up to join this communityI'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}$$
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
$$H(e^{j\omega})=\begin{cases}-j\,\textrm{sgn}(\omega)\,e^{-j\omega\tau},&\omega_c<\omega<\pi\\j\,\textrm{sgn}(\omega)\,e^{-j\omega\tau},&-\pi<\omega<-\omega_c\\0,&-\omega_c<\omega<\omega_c\end{cases}\tag{1}$$
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)$:
$$h[n]=\frac{\cos[\omega_c(n-\tau)]}{\pi(n-\tau)}\tag{3}$$