re = -3:.05:3; im = -3:.05:3;
a = 0.4;
b = 1.0;
z_List = [ 0 + 1.2*j 0 + 1.8*j 0 - 1.2*j, 0 - 1.8*j];
p_List = [ a*cos(pi/2+pi/12)+b*sin(pi/2+pi/12)*j a*cos(pi/2+4*pi/12)+b*sin(pi/2+4*pi/12)*j a*cos(pi/2+pi/12)-b*sin(pi/2+pi/12)*j a*cos(pi/2+4*pi/12)-b*sin(pi/2+4*pi/12)*j];


[X,Y] = meshgrid(re,im);
s = (X + Y*j);
s_jw = (0 + Y*j);

num = ones(length(X),length(Y));

for i=1:length(z_List)
   num = num .* (s .- z_List(i));	
end;


den = ones(length(X),length(Y));

for i=1:length(z_List)
   den = den .* (s .- p_List(i));	
end;

Zw_num = ones(length(X),length(Y));

for i=1:length(z_List)
   Zw_num = Zw_num .* (s_jw .- z_List(i));	
end;


Zw_den = ones(length(X),length(Y));

for i=1:length(z_List)
   Zw_den = Zw_den .* (s_jw .- p_List(i));	
end;


Zabs = abs(num ./ den );
Zabs = 10 * log10(Zabs);
Zarg = arg(num ./ den);
Zw = abs(Zw_num ./ Zw_den);
Zw = 10 * log10(Zw);
Zwarg = arg(Zw_num ./ Zw_den);

zmax = 20;
zmin = -10;
subplot(2,2,1); mesh(X,Y,Zabs);axis([re(1) re(end) im(1) im(end) zmin zmax]);
        hold on;
        plot3(X.*0,Y,Zw, 'linewidth',3,'color','r');
        hold off;
        view(50,10);
	caxis([-zmax zmax]);
        colormap(hsv(20));
subplot(2,2,2); mesh(X,Y,Zabs);axis([0 re(end) im(1) im(end) zmin zmax]);
        hold on;
        plot3(X.*0,Y,Zw, 'linewidth',3,'color','r');
        hold off;
        view(-90,10);
        caxis([-zmax zmax]);
        colormap(hsv(20));
subplot(2,2,3); mesh(X,Y,Zabs);axis([re(1) re(end) im(1) im(end) zmin zmax]);
        hold on;
        plot3(X.*0,Y,Zw, 'linewidth',3,'color','r');
        hold off;
        view(0,90);
        caxis([-zmax zmax]);
        colormap(hsv(20)); 
subplot(2,2,4); mesh(X,Y,Zarg);axis([0 re(end) im(1) im(end) -pi pi]);
        hold on;
        plot3(X.*0,Y,Zwarg, 'linewidth',3,'color','r');
        hold off;
        view(-90,10);