FILTER command

Syntax: | `FILTER\MEDIAN x f npt FILTER\MEAN x f npt FILTER\-RECURSIVE x f c FILTER\RECURSIVE x f c d`
Qualifiers: | `\MEDIAN, \MEAN, \RECURSIVE`
Defaults: | `\-RECURSIVE`
Examples: | `FILTER\MEDIAN X XF 5 FILTER\-RECURSIVE X XF [1;-2;1] FILTER\MEAN X XF -5 FILTER\RECURSIVE X XF [.3584;1.2832;.3584;0;0] [0;1]`

A digital filter is a linear combination of the input data, , and possibly the output data, . The input data is assumed to be equally spaced samples of some continuously varying quantity; and any error or noise is in the measurements. In this implementation of filters, the input data is assumed to have unit spacing, so a scale factor may have to be applied to produce the correctly scaled output data.

The simplest kinds of filters are the nonrecursive filters defined by the convolution formula:

The coefficients are the constants of the filter, the are the input data, and the are the outputs. When values of the output as well as the data values are used to compute the output values, the filter is called a recursive filter. It is usual to limit the range of nonzero coefficients to current and past values of the data and to only past values of the output . This type of filter is called causal recursive and can be defined by the convolution formula:

Nonrecursive or recursive filters using constant coefficients and are called time-invariant filters.

It can be shown that the sum of the squares of the filter coefficients measures the noise amplification of the filtering process. Thus, the variance, , will be amplified by .

Median filters
Mean filters
Nonrecursive filters
Recursive filters
Examples