title: Calculating the frequency response from filter coefficients
body: <p>I can't find any understandable information on this topic. On the dutch wikipedia, I found that you can apply a z-transform which produces a formula in this form:<br>
  <a href="http://www.music.mcgill.ca/~gary/618/week1/img15.gif" rel="nofollow noreferrer">www.music.mcgill.ca/~gary/618/week1/img15.gif</a></p>
  
  <p>This FIR filter is used as an example:<br>
  <a href="http://upload.wikimedia.org/math/b/9/e/b9e2ed5184f98621922f716e5216f33d.png" rel="nofollow noreferrer">upload.wikimedia.org/math/b/9/e/b9e2ed5184f98621922f716e5216f33d.png</a></p>
  
  <p>With the z-transform:<br>
  <a href="http://upload.wikimedia.org/math/4/d/6/4d6621be8fabf4db8816c12f34ed9877.png" rel="nofollow noreferrer">upload.wikimedia.org/math/4/d/6/4d6621be8fabf4db8816c12f34ed9877.png</a></p>
  
  <p>And in that example, e^it (the natural logarithm raised to the imaginary unit, and t = theta) is substituted for z:  <a href="http://upload.wikimedia.org/math/0/6/e/06eada8fedfb492bd63bb50491b042aa.png" rel="nofollow noreferrer">upload.wikimedia.org/math/0/6/e/06eada8fedfb492bd63bb50491b042aa.png</a></p>
  
  <p>Then a plot of that function is used and considered as the frequency response. I though that this method was an easy way to calculate the frequency response of a filter. However, is this method valid? When I thought about a small delay (which 'blocks' the original signal) it occurs to me that the frequency response should be 1 for every frequency, since the signal isn't changed, only delayed, but with this method, I calculated that the frequency response would be:  </p>
  
  <pre><code>y(n) = 0*x(n) + 1*x(n-1)  
  </code></pre>
  
  <p>Z-Transform  </p>
  
  <pre><code>H(z) = 0 + 1z^-1
  </code></pre>
  
  <p>Substituting e^it (with t=theta):</p>
  
  <pre><code>H(e^it) = 0 + 1 * e^-it
  </code></pre>
  
  <p>As this produces a sine wave as frequency response, I must be doing something wrong, or misunderstood something. I would be very glad if someone could help me! </p>