Here is prototype code I used for a different project that you can adapt, if you want an IIR filter:
Fs = 250;
Fn = Fs/2;
Ts = 1/Fs;
t = linspace(0, numel(EKG), numel(EKG))/Fs;
Wp = [2 90]/Fn;
Ws = [1 100]/Fn;
Rp = 1;
Rs = 50;
[n,Wp] = ellipord(Wp, Ws, Rp, Rs);
[z,p,k] = ellip(n, Rp, Rs, Wp,'bandpass');
[sos,g] = zp2sos(z,p,k);
figure
freqz(sos,2^16,Fs)
filtered_signal = filtfilt(sos,g,signal);
There are a number of FIR designs on Answers as well (I have posted many of them), although I usually reserve those for filters with multiple passbands and stopbands.
Best Answer