Calculates a moving median with zero phase shift.
LINMEDIAN(series, N, rampflag)
series |
- |
Any series, table, or expression resulting in a series or table. |
||||
N |
- |
An integer, the number of points to average as the series is processed. |
||||
rampflag |
- |
Optional. An integer, endpoint averaging flag.
|
A series or table.
W1: 1..5
W2: linmedian(w1, 3)
W2 contains the series:
{1.5, 2, 3, 4, 4.5}
The X offset of the result is 1.0.
W1: integ(gnorm(1000, 1/100))
W2: movmedian(w1, 10)
W3: linmedian(w1, 10)
W4: w1;overp(w2);overp(w3)

W1 contains 1000 samples of synthesized data.
W2 performs a 10 point standard moving median.
W3 performs a phaseless moving median by reversing the original data, computing a 10 point moving median, reversing the result and computing another 10 point moving median.
W4 plots the original data, the standard moving median and the phaseless moving median. Compared to the standard moving median, the peaks of the resulting smoothed series line up with the original data.
LINMEDIAN computes a zero phase moving median by reversing the input series, computing an N point moving average, reversing the result and computing another N point moving median. The reversal steps help ensure that the peak locations of the original data are preserved. The data is effectively smoothed with a 2N point median.
See LINEXPAVG to compute a zero phase exponential moving average.