-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathf_filterECG.m
47 lines (43 loc) · 1.31 KB
/
f_filterECG.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
% -------------------------------------------------------
%
% f_filterECG.m - This function applies high- and lowpass filters and
% removes isoline offset from ECGs
%
% Ver. 1.0.0
%
% Created: Claudia Nagel (13.10.2022)
% Last modified: Claudia Nagel (13.10.2022)
%
% Institute of Biomedical Engineering
% Karlsruhe Institute of Technology
%
% http://www.ibt.kit.edu
%
% Copyright 2000-2020 - All rights reserved.
%
% ------------------------------------------------------
%
% function [ECGsignals_filtered] = f_filterECG(ECGsignal, samplerate, hp_frq, lp_frq)
%
% Inputs:
% signal: ecg signal to be filtered
% samplerate: sample frequency in Hz of the signal
% lp_frq: cutoff frequency of the lowpass filter
% hp_frq: cutoff frequency of the highpass filter
%
% Outputs:
% ECGsignals_filtered: filtered ecg signal.
%
%
% Example Usage:
% ecg_filtered = f_filterECG(ecg, 500, 0.5, 150)
%
% Revision history:
%
%
function [ECGsignals_filtered] = f_filterECG(ECGsignal, samplerate, hp_frq, lp_frq)
[ecg_filtered_frq]=ECG_High_Low_Filter(ECGsignal,samplerate,hp_frq,lp_frq);
[ECGsignals_filtered,~,~,~]=Isoline_Correction(ecg_filtered_frq);
%ECGsignals_filtered=Notch_Filter(ecg_filtered_frq,samplerate,50,1);
ECGsignals_filtered = ECGsignals_filtered';
end