title: Convolution Theorem via the fft in MATLAB
body: <p>I'm in the process attempting to convolve and export an audio signal <code>y(t)</code> with a frequency response <code>h(t)</code> in different ways for a MATLAB project. It's been straightforward for the most part, however, I've run into difficulty when trying to convolve the signals using the Convolution Theorem.</p>
  
  <p>I'm able to take the Fourier Transforms of both signals easily using the <code>fft()</code> function, but when I multiply those two results together then use the <code>ifft()</code> functionto find my final signal, the program always outputs garbage. I've tried playing around with padding the input with zeros, but it hasn't done much.</p>
  
  <p>Here's the gist of the code I have at the moment (plot functions were removed for readability).</p>
  
  <pre><code>Y = fft(y);
  H = fft(h);
  
  F = Y*H;
  
  f = ifft(F);
  </code></pre>
  
  <p>For those who are interested, the audio file is a 38 second long .wav file with a sample rate of <code>22050</code>. The impulse response is the Cosine function between <code>-pi/2</code> and <code>pi/2</code>.</p>
  
  <p>Thanks in advance, any help is greatly appreciated.</p>