forked from guido57/EBAZ4205_SDR_spectrum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwindow_functions.h
58 lines (40 loc) · 1.8 KB
/
window_functions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
////////////////////////
// window_functions.h //
////////////////////////
#ifndef window_functions_h
#define window_functions_h
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
// COSINE WINDOWS
// Generic cosine window
void cosine_window (double * w, unsigned n, const double * coeff, unsigned ncoeff, bool sflag);
// Specific cosine windows
void rectwin (double * w, unsigned n ); // order == 1
void hann (double * w, unsigned n, bool sflag); // order == 2
void hamming (double * w, unsigned n, bool sflag); // order == 2
void blackman (double * w, unsigned n, bool sflag); // order == 3
void blackmanharris (double * w, unsigned n, bool sflag); // order == 4
void nuttallwin (double * w, unsigned n, bool sflag); // order == 4
void nuttallwin_octave (double * w, unsigned n, bool sflag); // order == 4
void flattopwin (double * w, unsigned n, bool sflag); // order == 5
void flattopwin_octave (double * w, unsigned n, bool sflag); // order == 5
// OTHER WINDOWS, NOT PARAMETERIZED
void triang (double * w, unsigned n);
void bartlett (double * w, unsigned n);
void barthannwin (double * w, unsigned n);
void bohmanwin (double * w, unsigned n);
void parzenwin (double * w, unsigned n);
// OTHER WINDOWS, PARAMETERIZED
void gausswin (double * w, unsigned n, double alpha);
void tukeywin (double * w, unsigned n, double r);
void taylorwin (double * w, unsigned n, unsigned nbar, double sll);
void kaiser (double * w, unsigned n, double beta);
void chebwin (double * w, unsigned n, double r);
// COMPLEX-VALUED, IN-PLACE FFT
void fft(double * z, unsigned size, bool inv);
#ifdef __cplusplus
} // end of extern "C"
#endif
#endif // window_functions_h