1.0.7 • Published 10 months ago

w-fft v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

w-fft

A tool for FFT.

language npm version license npm download npm download jsdelivr download

Documentation

To view documentation or get support, visit docs.

Example

To view some examples for more understanding, visit examples:

spectrum1d: ex-spectrum1d.html [source code]

Installation

Using npm(ES6 module):

Note: w-fft is mainly dependent on ml-fft, lodash-es and wsemi.

npm i w-fft

Example for FFT1D and iFFT1D:

Link: [dev source code]

let arr let res

arr = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 res = wf.fft1d(arr) console.log(res) // => [ // 120, 0 , // -8, 40.21871593700678 , // -8, 19.31370849898476 , // -7.999999999999999, 11.972846101323913 , // -8, 8 , // -8, 5.345429103354391 , // -8, 3.313708498984761 , // -7.999999999999999, 1.5912989390372623 , // -8, 0 , // -7.999999999999999, -1.5912989390372623 , // -8, -3.313708498984761 , // -8, -5.345429103354391 , // -8, -8 , // -7.999999999999999, -11.972846101323913 , // -8, -19.31370849898476 , // -8, -40.21871593700678 // ]

arr = [ 120, 0, -8, 40.21871593700678, -8, 19.31370849898476, -7.999999999999999, 11.972846101323913, -8, 8, -8, 5.345429103354391, -8, 3.313708498984761, -7.999999999999999, 1.5912989390372623, -8, 0, -7.999999999999999, -1.5912989390372623, -8, -3.313708498984761, -8, -5.345429103354391, -8, -8, -7.999999999999999, -11.972846101323913, -8, -19.31370849898476, -8, -40.21871593700678 ] res = wf.ifft1d(arr) console.log(res) // => // 0, 1, // 2, 3.0000000000000018, // 4, 5.000000000000002, // 6, 7, // 8, 9, // 10, 10.999999999999998, // 12, 12.999999999999998, // 14, 15 //

### In a browser(UMD module):
> **Note:** w-fft does not dependent on any package.

Add script for w-fft.
```alias
<script src="https://cdn.jsdelivr.net/npm/w-fft@1.0.7/dist/w-fft.umd.js"></script>
1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago