Linearly decimates (reduces) the sample rate and the number of points in a series by a factor n.
DECIMATE(series, n, start, blocksize)
series |
- |
A series or table. |
n |
- |
An integer factor by which to decimate the series. |
start |
- |
Optional. An integer specifying where to start the decimation. |
blocksize |
- |
Optional. An integer, the number of points to preserve at every decimation interval. Defaults to 1. |
A series.
W1: 1..5
W2: decimate(W1, 3)
Reduces the series in Window 1 by a factor of 3 by keeping every third point. W2 contains the series {1, 4}.
a = 1..20
decimate(a, 4, 10)
decimates the series a by a factor of 4, starting from the 10th point. Returns the series {10, 14, 18}.
W1: 1..10
W2: decimate(W1, 4, 1, 2)
Preserves two values at every 4th point. Returns the series {1, 2, 5, 6, 9, 10}.
Decimate is useful for extracting individual series from an interlaced source series:
W1: gsin(100,.01)
W2: gtri(100,.01)
W3: gnorm(100,.01)
W4: merge(W1, W2, W3)
W5: decimate(w4, 3, 1)
W6: decimate(W4, 3, 2)
W7: decimate(W4, 3, 3)
W5, W6 and W7 contain the original interlaced series of W1, W2 and W3.
The decimation factor automatically adjusts the sample rate (1/DELTAX) of the resulting series.
See DECILP to perform band limited decimation by means of low pass filtering.