title: Plotting Magnitude and Phase of Fourier Transform
body: <p>I am trying to plot the magnitude and phase representation of a fourier transform.</p>
  
  <p>Here is what I have so far:</p>
  
  <pre><code>syms t w
  y(t) = 2*cos(2000*pi*t)*cos(2*pi*(10^6)*t);
  x(w) = fourier(y);
  h = abs(x);
  a = angle(x)
  figure, fplot(h)
  figure, fplot(a)
  </code></pre>
  
  <p>But when I plot I just get two straight lines at 0. I understand that the fourier transform returns dirac delta functions. Is there anyway I can plot these functions in matlab?</p>