[569f14]: / PPG_preproc.m

Download this file

19 lines (12 with data), 303 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
function [PPG_filt] = PPG_preproc(PPG,fs)
% By Vandercastele et al. 2018
% Band Pass Filtering
ordr = 5;
ft_lp = 12; % [Hz]
Wn_lp = ft_lp/(fs/2);
ft_hp = 0.5; % [Hz]
Wn_hp = ft_hp/(fs/2);
Wn_bp = [Wn_hp,Wn_lp];
[b,a] = butter(ordr,Wn_bp);
PPG_filt = filtfilt(b,a,PPG);
end