Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: UIT_ACM1602NI UIT_ADDA mbed
Diff: WindowingDesignLpfHpf/WindowingDesignLH.hpp
- Revision:
- 6:e4b8e25573f3
- Parent:
- 5:184a0b023f5c
- Child:
- 7:46327dcab1bf
diff -r 184a0b023f5c -r e4b8e25573f3 WindowingDesignLpfHpf/WindowingDesignLH.hpp
--- a/WindowingDesignLpfHpf/WindowingDesignLH.hpp Sun Dec 07 11:55:00 2014 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-//------------------------------------------------------------------------------
-// Design of FIR filter of LPF and HPF using window method -- Header
-//
-// 2014/11/09, Copyright (c) 2014 MIKAMI, Naoki
-//------------------------------------------------------------------------------
-
-#ifndef HAMMING_WINDOWING_DESIGN_HPP
-#define HAMMING_WINDOWING_DESIGN_HPP
-
-#include "mbed.h"
-
-namespace Mikami
-{
- class WindowingDesign
- {
- public:
- struct Coefs { float a1, a2, b1; };
- enum Type { LPF, HPF };
-
- // Constructor
- WindowingDesign(int order, float fs);
-
- //Destructor
- ~WindowingDesign()
- {
- delete[] hm_;
- delete[] wn_;
- }
-
- // Execution of design
- void Design(int order, Type pb, float fc, float hk[]);
-
- private:
- static const float PI_ = 3.1415926536f;
- const float FS_; // Sampling frequency
- const float PI_FS_;
-
- float *hm_; // For coefficients
- float *wn_; // For Windwo
-
- int order_; // Order
- float fC_; // Cutoff frequency
-
- // Calculation of coefficients for LPF
- void LpfCoefficients();
- // Transform LPF to HPF
- void ToHpf();
- // Hamming window
- void HammWindow();
- };
-}
-#endif // HAMMING_WINDOWING_DESIGN_HPP