public class FFT
extends java.lang.Object
Constructor | Description |
---|---|
FFT() |
Modifier and Type | Method | Description |
---|---|---|
float[] |
cFFT(float[] sig) |
Complex FFT
|
float[] |
dB(float[] spec) |
|
int |
getm() |
|
int |
getN() |
|
float[] |
Hamming(float[] sig) |
|
float[] |
normHamming(float[] sig) |
|
float[] |
rFFT(float[] sig) |
|
void |
setm(int m) |
public void setm(int m)
m
- sets length N = 2^m where default of m = 9 gives
length N = 512 complex FFT, length 2N = 1024 real FFTpublic int getm()
public int getN()
public float[] cFFT(float[] sig)
sig
- is complex valued: the real part goes in the even samples,
the imaginary part in the odd samples.public float[] rFFT(float[] sig)
sig
- up to 2*N+2 real-valued elements of this array are the signal.spec[0], spec[1] = 0 are the real and imaginary parts of X[k=0],
spec[N], spec[N+1] = 0 are the real and imaginary parts of X[k=N/2] and where N = 2^m
public float[] Hamming(float[] sig)
sig
- has length N = sig.length.public float[] normHamming(float[] sig)
sig
- has length N = sig.length.The normalization makes the DC value of the window == 1.
public float[] dB(float[] spec)
spec
- has length == 2N+2 for N+1 complex samples returned by rFFT()