Skip to content

Commit

Permalink
Fix baseline filter.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterisza committed Feb 8, 2016
1 parent 00e90bd commit 47def78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Software/Common/SignalConditioning/EcgFilters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class NotchFilter: public SecondOrderIIR {
class BaselineFilter: public SecondOrderIIR {
public:
BaselineFilter(): SecondOrderIIR(
0.971607024954110, -1.943197760476778, 0.971607024954110,
1.000000000000000, -1.942391433620420, 0.944020376764578
0.987278499076673, -1.974553728592410, 0.9872784990766,
1.000000000000000, -1.974391885326068, 0.9747188414196
) {}
};

Expand Down
4 changes: 2 additions & 2 deletions Software/Common/SignalConditioning/filters.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

sf = 500*2000/2048;
sf2 = sf/2;
[b,a] = pei_tseng_notch(50/sf2, 0.2/sf2);
[b,a] = pei_tseng_notch(50/sf2, 0.5/sf2);
filtered = filtfilt(b, a, testSignal);
b
a

[b,a] = cheby2(2, 40, 0.45/sf2, "high");
[b,a] = cheby2(2, 40, 0.2/sf2, "high");
filtered = filtfilt(b, a, filtered);
b
a
Expand Down

0 comments on commit 47def78

Please sign in to comment.