![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
V001. 2017_11_30 10:21 Working code from Tuesday's lab session.
Fork of 2017_11_28_ELEC347_Coursework by
DSP Coursework ELEC347 2017-2018 Group members: Matthew Thewsey, Thomas Morris, Samuel Waggett, Christopher Hills .
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