R1=1000;
R2=200;
C1=1e-9;
C2=1e-9;
R3=500000;
 
f=logspace(3,5,200);
 
w=2*pi*f;
 
s=j*w;

G = -(s*C1*R3/R1) .* ( 1 ./ (1/R1 + 1/R2 + s*(C1+C2) + s.^2 * R3 * C1 * C2) );
semilogx(f, abs(G))

ifo=find(abs(G)==max(abs(G)))

fo=f(ifo)

i=find(abs(G)>0.707*max(abs(G)))

Delf=f(max(i)) - f(min(i))

Q=fo/Delf

Gain=max(abs(G))
