batch

Batch digital filter.

Syntax

batch(indep_vec, dep_vec, low, high, [extension])

Argument

indep_vec
The independent vector of the curve to be filtered.
dep_vec
The dependent vector of the curve to be filtered.
low
The low cutoff frequency (scalar expression).
high
The high cutoff frequency (scalar expression).
[extension]
The number of points to extend the curve by (scalar) (optional).

Example

Curve Math Vectors Result
x = c1.x

y = batch(c1.x, c1.y, 5, 8)

Given c1, a curve is created which is filtered through an ideal band-pass filter with low cutoff frequency 5 and high cutoff frequency 8.

Comments

The batch filter filters all points on a curve at once, or in a "batch." A Fast Fourier Transform (FFT) is used to transform the data into the frequency-domain where it is filtered. An inverse IFFT is then used to transform the data back into the time-domain. The resultant vector is the original curve filtered through an ideal filter with low and high cutoff frequencies.

It is assumed that the data is evenly sampled.

indep_vec and dep_vec must have the same number of elements. Both low and high must be non-negative.

To create a band-pass filter, specify a high cutoff frequency (fhigh) that is greater than the low cutoff frequency (flow).

Figure 1.


To create a notch filter, specify a high cutoff frequency (fhigh) that is less than the low cutoff frequency (flow).

Figure 2.


High-pass and low-pass filters are handled in the same manner as band-pass and notch filters. For a low-pass filter, the low cutoff frequency should be zero. For a high-pass filter, the high cutoff frequency should be zero.

If the cutoff frequency is greater than half the sampling Nyquist frequency, the curve is not filtered.

If the optional extension argument is used, the vector is extended at the beginning and end by extension points before filtering. These points are not present in the result. Using this option usually provides better accuracy at the ends of the resultant curve.