1)So I can't use a digital filter for processing the real time signal continuously?
I’m not aware of any MATLAB ability to do real-time digital filtering. The Audio Toolbox may have this ability, however I don’t have it so I have no experience with it.
2)I probably can save let's say 5 minutes of the signal and then filter it with a digital filter?
That’s certainly an option. The highpass and bandpass functions (R2018a and later) make the filter design much easier. (Return the second argument as the designeed filter, then use it with your signals with the filtfilt function to filter other signals.) If you don’t have those functions, it is easy to design an efficient ellliptic filter to do what you want.
Fs = 1000;
Fn = Fs/2;
Wp = [859 862]/Fn;
Ws = [855 865]/Fn;
Rp = 1;
Rs = 50;
[n,Wp] = ellipord(Wp,Ws,Rp,Rs);
[z,p,k] = ellip(n,Rp,Rs,Wp);
[sos,g] = zp2sos(z,p,k);
freqz(sos, 2^16, Fs)
s_filt = filtfilt(sos, g, s);
This designs a bandpass filter with passband frequencies of 859 to 862 Hz, and uses it fo filter signal vector ‘s’. For EKG signal processing, the passband would be 1 Hz to 100 Hz, with the stopbands of 0.5 Hz and 105 Hz.