DFT的matlab源代码英尺
这是任意长度的FFT实现。
这包括Cooley-Tukey
FFT(如果大小为2的幂,则使用)和Bluestein
FFT(用作后备)。
例子
复合DFT
/
IDFT
import
DFT
from
"fft"
;
const
size
=
1000
;
const
dft
=
new
DFT
(
size
)
;
const
xr
=
dft
.
createVec
(
"Float64Array"
)
;
//
Float32Array
and
Array
are
also
OK.
const
xi
=
dft
.
createVec
(
"Float64Array"
)
;
//
The
instance
of
xr
and
xi
must
be
the
same.
for
(
let
t
=
0
;
t
<
1000
;
t
++
)
{
xr
[
t
]
=
Math
.
random
(
)
;
xi
[
t
]
=
Math
.
random
(
)
;
}
const
[
Xr
,
Xi
]
=
dft
.
complexDFT
(
x
2022-04-08 08:49:13
79KB
系统开源
1