Skip to content

Instantly share code, notes, and snippets.

@jpcima
Created August 1, 2019 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpcima/38c464509213620841385a3a09f96547 to your computer and use it in GitHub Desktop.
Save jpcima/38c464509213620841385a3a09f96547 to your computer and use it in GitHub Desktop.
#include "bbd_filter.cc"
#include <cstdio>
int main()
{
double fmin = 0.0;
double fmax = 100000.0;
unsigned samples = 8192;
const BBD_Filter_Spec &spec = bbd_fin_j60;
//const BBD_Filter_Spec &spec = bbd_fout_j60;
for (unsigned i = 0; i < samples; ++i) {
double f = fmin + (fmax - fmin) * i * (1.0 / (samples - 1));
cdouble h = spec.transfer(f);
printf("%f %f %f\n", f, std::abs(h), std::arg(h));
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment