MCL
A C++ library mirroring some of the most common Matlab functions.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
butter.h
Go to the documentation of this file.
1 /*
2  butter.h
3  MCL
4 
5  Authors: user261002 @ stackoverflow.com
6 
7  Adapted from "http://stackoverflow.com/questions/10373184/bandpass-butterworth-filter-implementation-in-c"
8  */
9 
10 
11 #ifndef MCL_BUTTER_H
12 #define MCL_BUTTER_H
13 
14 #include <vector>
15 #include "iirfilter.h"
16 
17 namespace mcl {
18 
23 IirFilter Butter(const Int order,
24  const Real w_low, const Real w_high);
25 
29 IirFilter OctaveFilter(const Int order,
30  const Real center_frequency,
31  const Real sampling_frequency);
32 
34  const Int num_bands,
35  const Real starting_frequency,
36  const Real sampling_frequency);
37 
38 std::vector<double> ComputeLP(int FilterOrder);
39 std::vector<double> ComputeHP(int FilterOrder);
40 std::vector<double> TrinomialMultiply(int FilterOrder,
41  std::vector<double> b,
42  std::vector<double> c);
43 
44 std::vector<double> ComputeNumCoeffs(int FilterOrder,
45  double Lcutoff,
46  double Ucutoff,
47  std::vector<double> DenC);
48 
49 std::vector<double> ComputeDenCoeffs(int FilterOrder,
50  double Lcutoff,
51  double Ucutoff );
52 
53 } // namespace mcl
54 
55 #endif