w = linspace(-pi,pi,1000);

w0 = 24*pi*10^-3;
H = (1-exp(-j*(w-w0))).*(1-exp(-j*(w+w0)))./((1-1/2*exp(-j*(w-w0))).*(1-1/2*exp(-j*(w+w0))));

plot(w,abs(H));