Trying to use a bandpass butterworth filter on an ECG signal using the code below but whenever I use the lines:
h= filter( D,C,x) % where x= data
at the end of my code I just get a crazy plot which does not make sense or show my data. How could I accurately plot this filter with my data?
fp= [3 120];
fs= [2 200];
[N,fc]= buttord(fp/fn, fs/fn, 1, 60);
[D,C]= butter(N, fc);