IT++ 4.3.1
Resampling Functions

Functions

template<class T>
Vec< T > itpp::repeat (const Vec< T > &v, int norepeats)
 Repeat each element in the vector norepeats times in sequence.
 
template<class T>
Mat< T > itpp::repeat (const Mat< T > &m, int norepeats)
 Repeats each column norepeats times in sequence.
 
template<class T>
void itpp::upsample (const Vec< T > &v, int usf, Vec< T > &u)
 Upsample a vector by inserting (usf-1) zeros after each sample.
 
template<class T>
Vec< T > itpp::upsample (const Vec< T > &v, int usf)
 Upsample a vector by inserting (usf-1) zeros after each sample.
 
template<class T>
void itpp::upsample (const Mat< T > &v, int usf, Mat< T > &u)
 Upsample each column by inserting (usf-1) zeros after each column.
 
template<class T>
Mat< T > itpp::upsample (const Mat< T > &v, int usf)
 Upsample each column by inserting (usf-1) zeros after each column.
 
template<class T>
void itpp::lininterp (const Mat< T > &m, int usf, Mat< T > &u)
 Upsample each column by a factor of (usf-1) by linear interpolation.
 
template<class T>
Mat< T > itpp::lininterp (const Mat< T > &m, double f_base, double f_ups, int nrof_samples, double t_start=0)
 Upsample each column of matrix m to achieve f_ups frequency using linear interpolation.
 
template<class T>
Mat< T > itpp::lininterp (const Mat< T > &m, int usf)
 Upsample each column by a factor of (usf-1) by linear interpolation.
 
template<class T>
void itpp::lininterp (const Vec< T > &v, int usf, Vec< T > &u)
 Upsample by a factor of (usf-1) by linear interpolation.
 
template<class T>
Vec< T > itpp::lininterp (const Vec< T > &v, int usf)
 Upsample by a factor of (usf-1) by linear interpolation.
 
template<class T>
Vec< T > itpp::lininterp (const Vec< T > &v, double f_base, double f_ups, int nrof_samples, double t_start=0)
 Upsample vector v to achieve f_ups frequency using linear interpolation.
 

Detailed Description

Function Documentation

◆ repeat() [1/2]

template<class T>
Vec< T > itpp::repeat ( const Vec< T > & v,
int norepeats )

Repeat each element in the vector norepeats times in sequence.

Definition at line 46 of file resampling.h.

References itpp::Vec< Num_T >::length().

◆ repeat() [2/2]

template<class T>
Mat< T > itpp::repeat ( const Mat< T > & m,
int norepeats )

Repeats each column norepeats times in sequence.

Definition at line 59 of file resampling.h.

References itpp::Mat< Num_T >::cols(), itpp::Mat< Num_T >::get_col(), itpp::Mat< Num_T >::rows(), and itpp::Mat< Num_T >::set_col().

◆ upsample() [1/4]

template<class T>
void itpp::upsample ( const Vec< T > & v,
int usf,
Vec< T > & u )

Upsample a vector by inserting (usf-1) zeros after each sample.

Definition at line 73 of file resampling.h.

References itpp::Vec< Num_T >::clear(), it_assert_debug, itpp::Vec< Num_T >::length(), and itpp::Vec< Num_T >::set_size().

◆ upsample() [2/4]

template<class T>
Vec< T > itpp::upsample ( const Vec< T > & v,
int usf )

Upsample a vector by inserting (usf-1) zeros after each sample.

Definition at line 85 of file resampling.h.

◆ upsample() [3/4]

template<class T>
void itpp::upsample ( const Mat< T > & v,
int usf,
Mat< T > & u )

◆ upsample() [4/4]

template<class T>
Mat< T > itpp::upsample ( const Mat< T > & v,
int usf )

Upsample each column by inserting (usf-1) zeros after each column.

Definition at line 105 of file resampling.h.

◆ lininterp() [1/6]

template<class T>
void itpp::lininterp ( const Mat< T > & m,
int usf,
Mat< T > & u )

Upsample each column by a factor of (usf-1) by linear interpolation.

Definition at line 114 of file resampling.h.

References itpp::Mat< Num_T >::cols(), it_assert_debug, itpp::Mat< Num_T >::rows(), and itpp::Mat< Num_T >::set_size().

◆ lininterp() [2/6]

template<class T>
Mat< T > itpp::lininterp ( const Mat< T > & m,
double f_base,
double f_ups,
int nrof_samples,
double t_start = 0 )

Upsample each column of matrix m to achieve f_ups frequency using linear interpolation.

Author
Adam Piatyszek

This function performs upsampling of matrix m to achieve nrof_samples samples at f_ups frequency starting from the sample at t_start time. The frequency of input samples stored in the matrix m is defined by the f_base parameter.

Definition at line 137 of file resampling.h.

References itpp::Mat< Num_T >::cols(), it_assert_debug, and itpp::Mat< Num_T >::rows().

◆ lininterp() [3/6]

template<class T>
Mat< T > itpp::lininterp ( const Mat< T > & m,
int usf )

Upsample each column by a factor of (usf-1) by linear interpolation.

Definition at line 168 of file resampling.h.

◆ lininterp() [4/6]

template<class T>
void itpp::lininterp ( const Vec< T > & v,
int usf,
Vec< T > & u )

Upsample by a factor of (usf-1) by linear interpolation.

Definition at line 177 of file resampling.h.

References it_assert_debug, itpp::Vec< Num_T >::length(), and itpp::Vec< Num_T >::set_size().

◆ lininterp() [5/6]

template<class T>
Vec< T > itpp::lininterp ( const Vec< T > & v,
int usf )

Upsample by a factor of (usf-1) by linear interpolation.

Definition at line 190 of file resampling.h.

◆ lininterp() [6/6]

template<class T>
Vec< T > itpp::lininterp ( const Vec< T > & v,
double f_base,
double f_ups,
int nrof_samples,
double t_start = 0 )

Upsample vector v to achieve f_ups frequency using linear interpolation.

Author
Adam Piatyszek

This function performs upsampling of vector v to achieve nrof_samples samples at f_ups frequency starting from the sample at t_start time. The frequency of input samples stored in the vector v is defined by the f_base parameter.

Definition at line 208 of file resampling.h.

References it_assert_debug, and itpp::Vec< Num_T >::length().