zerocrossing function

Zero Crossing

Zero Crossing

Estimate zero crossing points of waveform.

zerocrossing(x, y)

Arguments

  • x: the x-coordinates of points in the function.
  • y: the y-coordinates of points in the function.

Returns

Zero-crossing points

Examples

x <- seq(0, 1, length.out = 100) y <- runif(100) - 0.5 x0 <- zerocrossing(x, y) plot(x, y, type ="l", xlab = "", ylab = "") points(x0, rep(0, length(x0)), col = "red")

Author(s)

Carlo de Falco, carlo.defalco@gmail.com .

Conversion to R by Geert van Boxtel, G.J.M.vanBoxtel@gmail.com .

  • Maintainer: Geert van Boxtel
  • License: GPL-3
  • Last published: 2024-09-11