Algorithm for conv, filter

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Algorithm for conv, filter

Steve C. Thompson
Hi,

I've got $5 on: `conv (a, b)' is implemented as `ifft (af, bf)'
where AF and BF are the FFTs of A and B (roughly speaking).
Trying to prove this, I glanced at the octave source code for
`conv' and I see that it calls `filter'.  (From what I
understand, `filter' and `conv' are essentially the same but
`conv' returns a complete convolution while `filter' truncates
the samples.)  However, I can't figure out what `filter' does
since I can only find the .oct file on my computer---Linux
version 2.6.12-9-686 (gcc version 3.4.5 20050809 (prerelease)
(Ubuntu 3.4.4-6ubuntu8)); GNU Octave, version 2.1.71
(i486-pc-linux-gnu)---I'm not sure what filter is doing.

Does the algorithm in `filter' take the IFFT of two FFTs?

Thanks in advance.

Steve



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: Algorithm for conv, filter

Stéfan van der Walt
Hi Steve

IIRC, conv calculates the convolution per element.  Maybe you are
looking for fftconv.

St?fan

On Thu, Dec 08, 2005 at 07:01:31AM -0800, Steve C. Thompson wrote:

> Hi,
>
> I've got $5 on: `conv (a, b)' is implemented as `ifft (af, bf)'
> where AF and BF are the FFTs of A and B (roughly speaking).
> Trying to prove this, I glanced at the octave source code for
> `conv' and I see that it calls `filter'.  (From what I
> understand, `filter' and `conv' are essentially the same but
> `conv' returns a complete convolution while `filter' truncates
> the samples.)  However, I can't figure out what `filter' does
> since I can only find the .oct file on my computer---Linux
> version 2.6.12-9-686 (gcc version 3.4.5 20050809 (prerelease)
> (Ubuntu 3.4.4-6ubuntu8)); GNU Octave, version 2.1.71
> (i486-pc-linux-gnu)---I'm not sure what filter is doing.



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------