SigPack - the C++ signal processing library
Math

Functions

arma_inline double sp::sinc (double x)
 
arma_inline arma::vec sp::sinc (const arma::vec &x)
 
arma_inline double sp::besseli0 (double x)
 
template<typename T >
double sp::angle (const std::complex< T > &x)
 
arma_inline arma::vec sp::angle (const arma::cx_vec &x)
 
arma_inline arma::mat sp::angle (const arma::cx_mat &x)
 
arma_inline arma::vec sp::unwrap (const arma::vec &x)
 

Variables

const double sp::PI = 3.14159265358979323846
 
const double sp::PI_2 = 6.28318530717958647692
 

Detailed Description

Function Documentation

◆ angle() [1/3]

template<typename T >
double sp::angle ( const std::complex< T > &  x)

Calculates angle in radians for complex input.

Parameters
xComplex input value

Definition at line 67 of file base.h.

Referenced by sp::phasez(), and sp::specgram_ph().

◆ angle() [2/3]

arma_inline arma::vec sp::angle ( const arma::cx_vec &  x)

Calculates angle in radians for complex input.

Parameters
xComplex input vector

Definition at line 76 of file base.h.

◆ angle() [3/3]

arma_inline arma::mat sp::angle ( const arma::cx_mat &  x)

Calculates angle in radians for complex input.

Parameters
xComplex input matrix

Definition at line 89 of file base.h.

◆ besseli0()

arma_inline double sp::besseli0 ( double  x)

Modified first kind bessel function order zero.

See bessel functions on Wikipedia

Parameters
x

Definition at line 51 of file base.h.

Referenced by sp::kaiser().

◆ sinc() [1/2]

arma_inline double sp::sinc ( double  x)

A sinc, sin(x)/x, function.

Parameters
xThe angle in radians

Definition at line 21 of file base.h.

Referenced by sp::fd_filter(), sp::fir1(), sp::fir1_bp(), sp::fir1_bs(), sp::fir1_hp(), and sp::sinc().

◆ sinc() [2/2]

arma_inline arma::vec sp::sinc ( const arma::vec &  x)

A sinc, sin(x)/x, function.

Parameters
xThe angle in radians

Definition at line 33 of file base.h.

References sp::sinc().

Here is the call graph for this function:

◆ unwrap()

arma_inline arma::vec sp::unwrap ( const arma::vec &  x)

Unwraps the angle vector x, accumulates phase.

Parameters
xComplex input vector

Definition at line 103 of file base.h.

References sp::PI_2.

Variable Documentation

◆ PI

const double sp::PI = 3.14159265358979323846

... or use arma::datum::pi

Definition at line 14 of file base.h.

Referenced by sp::fir1_bp(), sp::fir1_hp(), and sp::freq().

◆ PI_2

const double sp::PI_2 = 6.28318530717958647692

Definition at line 15 of file base.h.

Referenced by sp::cos_win(), sp::goertzel(), sp::hanning(), and sp::unwrap().