computes a "fast convolution" of a digital signal and an impulse-response sequence. It returns the
This routine is written in the IDL language. Its source code can be found in the file
subdirectory of the IDL distribution.
Result = BLK_CON(
-element floating-point vector containing the impulse-response sequence of the digital filter.
-element floating-point vector containing the discrete signal samples.
A scalar specifying the
of the subdivided signal segments. If this parameter is not specified, a near-optimal value is chosen by the algorithm based upon the length
of the impulse-response sequence. If
is a value less than 11 or greater than 377, then B_LENGTH must be specified.
B_LENGTH must be greater than the filter length,
, and less than the number of signal samples.
Create a filter of length
filter = REPLICATE(1.0,32)
filter(2*INDGEN(16)) = 0.5
Create a sampled signal with random noise:
signal = SIN((FINDGEN(1000)/35.0)^2.5)
noise = (RANDOMU(SEED,1000)-.5)/2.
signal = signal + noise
Convolve the filter and signal using block convolution:
result = BLK_CON(filter, signal)