Rfiltercalculates the sequence produced by filtering the time-domain (or space-domain) sequence inAby the filter whose frequency-domain coefficients are inF. It returns the resulting sequence in the arrayB.Lognis the base-2 log of the number of points in the sequences inAandB. The arraysAandBmust contain at least 2Lognelements. The arrayFmust contain at least 2Logn-1 elements. If the arrays have extra elements, the extra elements are ignored and unmodified.
The values inFare the amounts by which to scale the corresponding frequency components inAto produce the resultant sequence. These values are magnitudes;Rfilterassumes that all filter coefficients have zero phase; useFilterto use a filter function having both magnitude and phase.
The first element inFrepresents the amount by which the d. c. term inAis to be scaled, the second the amount by which the 1/Nfrequency component is scaled, the third the amount by which the 2/Nfrequency component is scaled, etc. The meaning of each frequency component is the same forRfilteras forFftand is explained in the entry forFft.
If the sequence to be used as a filter is specified as an impulse response, theConvolvefunction may be used to filter using the impulse response as input.
Errors
Rfiltercauses an HTBasic error if its arguments are not of the types shown in the USAGE section, above, ifLognis not between 2 and 15, inclusive, or if the size ofAorBis smaller than 2Logn, or ifFis smaller than 2Logn-1.