# Transforming a low pass filer to a high pass filter

Hi, I have trouble understanding how to achieve this transformation

Suppose for example that we have a low pass filter which impulse response is the following

h(n) = 1 for 0<=n<=2 where n is an integer

In the frequency domain we would have the following frequency response:

$$H(e^{j\omega}) = \sum_{n=0}^{2} h(n) e^{-j \omega n} = 1 + e^{-j \omega} + e^{- 2j\omega}$$

now, this is a low pass filter, and in order to make it high pass I have to make a shift in the frequency domain, suppose by π

So we would have in the time domain a multiplication by cos(n*π)

so the new impulse response is h(n) = cos(nπ) h(n)

for n = 0 we have hn(n) = 1
for n=1 we have hn(n) = -1
for n=2 we have hn(n) = 1

so the NEW impulse response will be the following vector [1 -1 1]

the problem is that my professor finds the result [-1 1 -1]

and I'm not sure why

here's his explanation:

$$h_{hp}(n) = [1 1 1] .* [cos(-1 \pi) \;\; cos(0 \pi)\; \; cos(1 \pi) ] = [1 1 1] .* [-1 \;1 \;-1] = [-1 \;1 -\;1]$$

isn't this wrong? I mean where does this cos(-1 π) come from?