SigPack - the C++ signal processing library
Resampling

Classes

class  sp::resampling< T1 >
 

Functions

template<class T1 >
arma::Col< T1 > sp::upsample (const arma::Col< T1 > &x, const int p)
 
template<class T1 >
arma::Col< T1 > sp::downsample (const arma::Col< T1 > &x, const int q)
 

Detailed Description

Function Documentation

◆ downsample()

template<class T1 >
arma::Col<T1> sp::downsample ( const arma::Col< T1 > &  x,
const int  q 
)

Downsampling without anti alias filtering.

Returns
A vector with every q:th value from the input vector
Parameters
xInput vector
qDownsampling factor

Definition at line 38 of file resampling.h.

◆ upsample()

template<class T1 >
arma::Col<T1> sp::upsample ( const arma::Col< T1 > &  x,
const int  p 
)

Upsampling without anti alias filtering.

Returns
A vector with p-1 zeros inserted in the input vector [x0,0,0,..,x1,0,0,..-..,xN,0,0,..]
Parameters
xInput vector
pUpsampling factor

Definition at line 20 of file resampling.h.