Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Finds all zero crossings in a 1D ndarray

License

Notifications You must be signed in to change notification settings

plotly/zero-crossings

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zero-crossings

Finds all zero crossings in a 1D ndarray assuming piecewise-linear interpolation.

Example

var ndarray = require("ndarray")
var zc = require("zero-crossings")

var array = ndarray([1, -1, 0, 10, 3, -1])

console.log(zc(array))

Output:

[ 0.5, 2, 4.75 ]

Install

npm install zero-crossings

API

require("zero-crossings")(array[,level])

Finds all zero crossings in the 1D ndarray array

  • array is a 1D ndarray
  • level is an optional parameter which indicates the crossings

Returns A list of all zero crossings in array

Credits

(c) 2014 Mikola Lysenko. MIT License

About

Finds all zero crossings in a 1D ndarray

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%