Go to the documentation of this file.
50 for (
int i = 0;i < n;i++)
51 t[i] = (0.54 - 0.46 *
std::cos(2.0 *
pi * i / (n - 1)));
60 for (
int i = 0;i < n;i++)
61 t(i) = 0.5 * (1.0 -
std::cos(2.0 *
pi * (i + 1) / (n + 1)));
71 for (
int i = 0;i < n;i++)
72 t(i) = 0.5 * (1.0 -
std::cos(2.0 *
pi * i / (n - 1)));
81 for (
int i = 0;i < n;i++)
92 for (
int i = 0; i < n / 2; i++)
93 t(i) = t(n - i - 1) = 2.0 * (i + 1) / (n + 1);
97 for (
int i = 0; i < n / 2; i++)
98 t(i) = t(n - i - 1) = (2.0 * i + 1) / n;
108 for (
int i = 0; i < n / 2; i++)
109 t(i) = t(n - i - 1) =
std::sqrt(2.0 * (i + 1) / (n + 1));
113 for (
int i = 0; i < n / 2; i++)
114 t(i) = t(n - i - 1) =
std::sqrt((2.0 * i + 1) / n);
121 it_assert((n > 0),
"chebwin(): need a positive order n!");
127 at = at < 0 ? -at : at;
133 vec p =
cheb(n - 1, beta * cos_k);
139 int half_length = n / 2 + 1;
140 w = w.left(half_length) / w(1);
145 int half_length = (n + 1) / 2;
146 w = w.left(half_length) / w(0);
const Array< T > concat(const Array< T > &a, const T &e)
Append element e to the end of the Array a.
vec hamming(int n)
Hamming window.
bool is_even(int x)
Return true if x is an even integer.
vec cosh(const vec &x)
Cosine hyperbolic function.
IT++ compatibility types and functions.
vec chebwin(int n, double at)
Dolph-Chebyshev window.
vec triang(int n)
Triangular window.
vec hann(int n)
Hanning window compatible with matlab.
double pow10(double x)
Calculate ten to the power of x (10^x)
Vec< Num_T > right(int nr) const
Get the right nr elements from the vector.
Mat< Num_T > elem_mult(const Mat< Num_T > &m1, const Mat< Num_T > &m2)
Element wise multiplication of two matrices.
vec sin(const vec &x)
Sine function.
const double pi
Constant Pi.
vec acosh(const vec &x)
Inverse cosine hyperbolic function.
cvec to_cvec(const Vec< T > &v)
Converts a Vec<T> to cvec.
vec linspace(double from, double to, int points)
linspace (works in the same way as the MATLAB version)
Definitions of special vectors and matrices.
vec blackman(int n)
Blackman window.
double cheb(int n, double x)
Chebyshev polynomial of the first kind.
vec sqrt_win(int n)
Square root window.
vec sqrt(const vec &x)
Square root of the elements.
Definitions of window functions.
vec hanning(int n)
Hanning window.
vec cos(const vec &x)
Cosine function.
Trigonometric and hyperbolic functions - header file.
Definitions of converters between different vector and matrix types.
Definitions of operators for vectors and matricies of different types.
Vec< T > reverse(const Vec< T > &in)
Reverse the input vector.
ITPP_EXPORT void ifft_real(const cvec &in, vec &out)
Inverse Real Fast Fourier Transform.
#define it_assert(t, s)
Abort if t is not true.
Generated on Thu Apr 11 2019 00:00:00 for IT++ by Doxygen 1.8.18