2019-03-17 16:31:42 -04:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "filtergen.h"
|
|
|
|
|
|
|
|
namespace leansdr
|
|
|
|
{
|
|
|
|
namespace filtergen
|
|
|
|
{
|
|
|
|
|
|
|
|
void dump_filter(const char *name, int ncoeffs, float *coeffs)
|
|
|
|
{
|
|
|
|
fprintf(stderr, "%s = [", name);
|
2021-03-21 21:06:26 -04:00
|
|
|
|
|
|
|
for (int i = 0; i < ncoeffs; ++i) {
|
2019-03-17 16:31:42 -04:00
|
|
|
fprintf(stderr, "%s %f", (i ? "," : ""), coeffs[i]);
|
2021-03-21 21:06:26 -04:00
|
|
|
}
|
|
|
|
|
2019-03-17 16:31:42 -04:00
|
|
|
fprintf(stderr, " ];\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
} // filtergen
|
2021-03-21 21:06:26 -04:00
|
|
|
} // leansdr
|