clear all
close all

fSamp = 1000; % Hz
fPassPhys = 35; % Hz
fStopPhys = 90; % Hz
rPass = 1; % dB
rStop = 40; % dB

[nOrd, wn] = ellipord(2*fPassPhys/fSamp, 2*fStopPhys/fSamp, rPass, rStop)
[b,a]=ellip(nOrd, rPass, rStop, wn)

figure; freqz(b,a,1024,fSamp)
figure; grpdelay(b,a,1024,fSamp); axis([0 fStopPhys 0 50])


fSamp = 1000; % Hz
fPassPhys = 35; % Hz
fStopPhys = 60; % Hz
rPass = 1; % dB
rStop = 40; % dB

[nOrd, wn] = ellipord(2*fPassPhys/fSamp, 2*fStopPhys/fSamp, rPass, rStop)
[b,a]=ellip(nOrd, rPass, rStop, wn)

figure; freqz(b,a,1024,fSamp)
figure; grpdelay(b,a,1024,fSamp); axis([0 fStopPhys 0 50])

fSamp = 1000; % Hz
fPassPhys = 35; % Hz
fStopPhys = 90; % Hz
rPass = 0.5; % dB
rStop = 40; % dB

[nOrd, wn] = ellipord(2*fPassPhys/fSamp, 2*fStopPhys/fSamp, rPass, rStop)
[b,a]=ellip(nOrd, rPass, rStop, wn)

figure; freqz(b,a,1024,fSamp)
figure; grpdelay(b,a,1024,fSamp); axis([0 fStopPhys 0 50])

