![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Non-variable (TESTEDandWORKING)
Fork of ELEC347_Coursework by
Diff: Filter.cpp
- Revision:
- 6:a2737b51424c
- Parent:
- 2:f6e49378dd8a
- Child:
- 7:6cb27cce4c50
diff -r e49e5515488d -r a2737b51424c Filter.cpp --- a/Filter.cpp Tue Nov 28 09:59:04 2017 +0000 +++ b/Filter.cpp Tue Nov 28 13:06:24 2017 +0000 @@ -1,6 +1,8 @@ +#include "mbed.h" #include "Filter.hpp" #include <math.h> + #define PI 3.14159 FILTER::FILTER(int Fs, int Fo, double Boost, int Q) //Constuctor @@ -83,3 +85,12 @@ _a2 = _DC2 / _Com_Den; } +void FILTER::Print_Filter() //Print Filter Coefficients +{ + printf("Num 1 = %f\n\r", _b0); + printf("Num 2 = %f\n\r", _b1); + printf("Num 3 = %f\n\r", _b2); + printf("Den 1 = %f\n\r", _a0); + printf("Den 2 = %f\n\r", _a1); + printf("Den 3 = %f\n\r", _a2); +} \ No newline at end of file