FILTER
Syntax: FILTER xin xout npt
FILTER\MEDIAN xin xout npt
The default filter is the median filter. The third parameter, npt, should be
a scalar value. The data is filtered through a window npt points in width,
npt must be > 1.
Syntax: FILTER\MEAN xin xout npt
If the \MEAN qualifier is used, the filter will be the running mean or
average filter. There are two versions available depending on whether
npt is positive or negative. If npt > 0, the mean is calculated by
summing the relevant points and dividing by npt. The averaging window
butts up against the end. If npt < 0, a new point is added to the right
and an old point is dropped from the left. The averaging window runs off
half way from each end, and pseudo points outside the range are set to
the end point values.
Syntax: FILTER\NONRECURSIVE xin xout c
If the \NONRECURSIVE qualifier is used, the third parameter should be a
vector, c. The c[i]'s are assumed to be the filter coefficients. For
example, c[1]=+1, c[2]=-1 will differentiate the xin vector, while c[1]=+1,
c[2]=-2, c[3]=+1 produces the second derivative of xin.
Syntax: FILTER\RECURSIVE xin xout c d
If the \RECURSIVE qualifier is used, the third and fourth parameters
should be vectors. The data array is processed through a recursive filter.
This allows for the specification of a completely general recursive filter
of arbitrary length. The d[i]'s are filter coefficients which operate on
the previously made output xout[i-k] where k=1 to n (n=length of d). For
example, the Leo Tick formula for integration uses:
c = [0.3584;1.2832;0.3584], d = [0;1].