Whole-signal ZCR if frame_length = NULL; otherwise per-frame
ZCR over consecutive non-overlapping frames.
Usage
morie_dsp_zero_crossing(x, frame_length = NULL)
Arguments
- x
Numeric vector.
- frame_length
Optional frame length.
Value
Scalar (whole signal) or numeric vector (per frame).
References
Rangayyan & Krishnan (2015), Ch. 4, sec. 4.3.
Examples
N <- 1000L; t <- seq.int(0, N - 1L) / N
x <- sin(2 * pi * 5 * t)
morie_dsp_zero_crossing(x)
#> [1] 0.01001001