Skip to contents

Optimal linear filter against white Gaussian noise: convolves x with the time-reversed template, normalised by ||template||.

Usage

morie_dsp_matched(x, template)

Arguments

x

Numeric vector.

template

Reference waveform.

Value

Matched-filter output, length(x).

References

Rangayyan & Krishnan (2015), Ch. 3, sec. 3.5.

Examples

set.seed(1L)
tpl <- c(1, 2, 3, 2, 1)
x <- c(rnorm(20, sd = 0.01), tpl, rnorm(20, sd = 0.01))
y <- morie_dsp_matched(x, tpl)
which.max(y)
#> [1] 23