Functions | |
template<class T1 > | |
arma::cx_vec | sp::spectrum (const arma::Col< T1 > &x, const arma::vec &W) |
template<class T1 > | |
arma::vec | sp::psd (const arma::Col< T1 > &x, const arma::vec &W) |
template<class T1 > | |
arma::vec | sp::psd (const arma::Col< T1 > &x) |
template<class T1 > | |
arma::cx_mat | sp::specgram_cx (const arma::Col< T1 > &x, const arma::uword Nfft=512, const arma::uword Noverl=256) |
template<class T1 > | |
arma::mat | sp::specgram (const arma::Col< T1 > &x, const arma::uword Nfft=512, const arma::uword Noverl=256) |
template<class T1 > | |
arma::mat | sp::specgram_ph (const arma::Col< T1 > &x, const arma::uword Nfft=512, const arma::uword Noverl=256) |
template<class T1 > | |
arma::vec | sp::pwelch_ph (const arma::Col< T1 > &x, const arma::uword Nfft=512, const arma::uword Noverl=256) |
template<class T1 > | |
arma::vec | sp::pwelch (const arma::Col< T1 > &x, const arma::uword Nfft=512, const arma::uword Noverl=256) |
template<class T1 > | |
std::complex< double > | sp::goertzel (const arma::Col< T1 > &x, const double f) |
template<class T1 > | |
arma::cx_vec | sp::goertzel (const arma::Col< T1 > &x, const arma::vec f) |
std::complex<double> sp::goertzel | ( | const arma::Col< T1 > & | x, |
const double | f | ||
) |
DFT calculation of a single frequency using Goertzel's method.
For more details see Sysel and Rajmic
x | Input vector |
f | Frequency index |
Definition at line 193 of file spectrum.h.
References sp::PI_2.
Referenced by sp::goertzel().
arma::cx_vec sp::goertzel | ( | const arma::Col< T1 > & | x, |
const arma::vec | f | ||
) |
DFT calculation of a vector of frequencies using Goertzel's method.
For more details see Sysel and Rajmic
x | Input vector |
f | Frequency index vector |
Definition at line 233 of file spectrum.h.
References sp::goertzel().
arma::vec sp::psd | ( | const arma::Col< T1 > & | x, |
const arma::vec & | W | ||
) |
Power spectrum density calculation using windowed data.
x | Input vector |
W | Window function vector. NB! Must be same size as input vector |
Definition at line 37 of file spectrum.h.
References sp::spectrum().
Referenced by sp::psd().
arma::vec sp::psd | ( | const arma::Col< T1 > & | x | ) |
Power spectrum density calculation using Hamming windowed data.
x | Input vector |
Definition at line 51 of file spectrum.h.
References sp::hamming(), and sp::psd().
arma::vec sp::pwelch | ( | const arma::Col< T1 > & | x, |
const arma::uword | Nfft = 512 , |
||
const arma::uword | Noverl = 256 |
||
) |
Power spectrum calculation using Welch's method.
abs(pwelch(x,Nfft,Noverl)) is equivalent to Matlab's: pwelch(x,Nfft,Noverl,'twosided','power')
See Welch's method at Wikipedia
x | Input vector |
Nfft | FFT size |
Noverl | FFT overlap size |
Definition at line 175 of file spectrum.h.
References sp::specgram().
arma::vec sp::pwelch_ph | ( | const arma::Col< T1 > & | x, |
const arma::uword | Nfft = 512 , |
||
const arma::uword | Noverl = 256 |
||
) |
Phase spectrum calculation using Welch's method.
See Welch's method at Wikipedia
x | Input vector |
Nfft | FFT size |
Noverl | FFT overlap size |
Definition at line 155 of file spectrum.h.
References sp::specgram_ph().
arma::mat sp::specgram | ( | const arma::Col< T1 > & | x, |
const arma::uword | Nfft = 512 , |
||
const arma::uword | Noverl = 256 |
||
) |
Power spectrogram calculation.
See spectrogram at Wikipedia
x | Input vector |
Nfft | FFT size |
Noverl | FFT overlap size |
Definition at line 114 of file spectrum.h.
References sp::specgram_cx().
Referenced by main(), and sp::pwelch().
arma::cx_mat sp::specgram_cx | ( | const arma::Col< T1 > & | x, |
const arma::uword | Nfft = 512 , |
||
const arma::uword | Noverl = 256 |
||
) |
Spectrogram calculation using Hamming windowed data.
See spectrogram at Wikipedia
x | Input vector |
Nfft | FFT size |
Noverl | FFT overlap size |
Definition at line 68 of file spectrum.h.
References sp::hamming(), and sp::spectrum().
Referenced by sp::specgram(), and sp::specgram_ph().
arma::mat sp::specgram_ph | ( | const arma::Col< T1 > & | x, |
const arma::uword | Nfft = 512 , |
||
const arma::uword | Noverl = 256 |
||
) |
Phase spectrogram calculation.
See spectrogram at Wikipedia
x | Input vector |
Nfft | FFT size |
Noverl | FFT overlap size |
Definition at line 134 of file spectrum.h.
References sp::angle(), and sp::specgram_cx().
Referenced by sp::pwelch_ph().
arma::cx_vec sp::spectrum | ( | const arma::Col< T1 > & | x, |
const arma::vec & | W | ||
) |
Windowed spectrum calculation.
The spectrum is calculated using the fast fourier transform of the windowed input data vector
x | Input vector |
W | Window function vector. NB! Must be same size as input vector |
Definition at line 23 of file spectrum.h.
Referenced by sp::psd(), and sp::specgram_cx().