BZSUPPORT: convolution with a polyphase FIR filter.

From: Garth_Dickie@avid.com
Date: Mon Aug 02 1999 - 11:02:49 EST


Hi,

I'm new to Blitz++; please excuse my ignorance.

I would like to express convolution with a linear filter using Blitz++ arrays.

The best I have been able to come up with is:

     Range I( 0, 719 );
     Range J( -19, 20 );

     Array< double, 1 > source( I );
     Array< double, 1 > filter( J );
     Array< double, 1 > destination( I );
     Array< double, 1 > temp( Range( -19 .. 739 )); // it would be nice to write
 I + J here...

     temp = 0;
     temp( I ) = source;
     for( int m = 0; m < 720; ++ m )
          destination( m ) = sum( temp( J + m ) * filter );

I had been hoping to do something like:

     destination( I ) = sum( temp( J + tensor::i ) * filter );

rather than the explicit loop, but egcs is barfing on this.

Any suggestions?

Regards,
Garth A. Dickie

--------------------- blitz-support list --------------------------------
* To subscribe/unsubscribe: use the handy web form at
http://oonumerics.org/blitz/lists.html



This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 05:10:06 EST