Fs=100e3;        %   100 kHz sampling frequency

T=1/Fs;
N=4096;          %   N samples
wz = 1e3;  		 %  
wp = 1e5;

freq = Fs/N:Fs/N:Fs;       %   frequencies are multiples of the fundamental frequency Ff = Fs/N
w = 2*pi*freq;
z=exp(j*w*T);           %   Z-Transform variable 

hs = 100*(1+j*w/wz)./(j*w.*(1+j*w/wp));     %   Continuous filter transfer function
hsdB=20*log10(abs(hs));

a=exp(-wz*T);
b=exp(-wp*T);

A=T*(1-b)*100/(1-a);
disp(['a = ' num2str(a) '    b = ' num2str(b) '    A = ' num2str(A)])

hz = A*(z-a)./((z-1).*(z-b));    %   Discrete filter transfer function
hzdB=20*log10(abs(hz));

L=N/2;

semilogx(freq(1:L),hsdB(1:L), '-',freq(1:L),hzdB(1:L),':')
ylabel('Filter gain (dB)'), xlabel('frequency (Hz)')
legend('Continuous Filter', 'Discrete Filter',3)

text(200,-4,['a = ' num2str(a)]);
text(200,-6, ['b = ' num2str(b)]);
text(200,-8,['A = ' num2str(A)]);