Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikolalysenko/zero-crossings
Finds all zero crossings in a 1D ndarray
https://github.com/mikolalysenko/zero-crossings
Last synced: about 2 months ago
JSON representation
Finds all zero crossings in a 1D ndarray
- Host: GitHub
- URL: https://github.com/mikolalysenko/zero-crossings
- Owner: mikolalysenko
- License: mit
- Created: 2014-04-10T04:01:56.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-09-01T13:49:42.000Z (over 3 years ago)
- Last Synced: 2024-10-20T14:27:01.461Z (2 months ago)
- Language: JavaScript
- Size: 145 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
zero-crossings
==============
Finds all zero crossings in a 1D ndarray assuming piecewise-linear interpolation.# Example
```javascript
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