|
|
|
|
@ -20,6 +20,7 @@
@@ -20,6 +20,7 @@
|
|
|
|
|
#define INCLUDE_RAISEDCOSINE_H |
|
|
|
|
|
|
|
|
|
#include <cmath> |
|
|
|
|
#include <cstdio> |
|
|
|
|
#include "dsp/dsptypes.h" |
|
|
|
|
|
|
|
|
|
// Raised-cosine low-pass filter for pulse shaping, without intersymbol interference (ISI)
|
|
|
|
|
@ -131,6 +132,19 @@ public:
@@ -131,6 +132,19 @@ public:
|
|
|
|
|
return acc; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Print taps as a Matlab vector
|
|
|
|
|
void printTaps(const char *name) |
|
|
|
|
{ |
|
|
|
|
printf("%s = [", name); |
|
|
|
|
for (int i = 0; i <= m_taps.size() - 1; ++i) { |
|
|
|
|
printf("%g ", m_taps[i]); |
|
|
|
|
} |
|
|
|
|
for (int i = m_taps.size() - 2; i >= 0; --i) { |
|
|
|
|
printf("%g ", m_taps[i]); |
|
|
|
|
} |
|
|
|
|
printf("];\n"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private: |
|
|
|
|
std::vector<Real> m_taps; |
|
|
|
|
std::vector<Type> m_samples; |
|
|
|
|
|