clear all;
close all;
dolnykoniec=0;
hornykoniec=0;
om=linspace(0,2*pi,1000);
fi=130;
a=0.05;

nula1=-1;
nula2=cos(3*pi/4)+i*sin(3*pi/4);
pol1=i*65/100;
pol2=a.*(cos(180*pi/fi)+i*sin(180*pi/fi));

H=(1-nula1.*exp(-i*om)).*(1-nula2.*exp(-i*om)).*(1-conj(nula2).*exp(-i*om))./((1-pol1.*exp(-i*om)).*(1-conj(pol1).*exp(-i*om)).*(1-pol2.*exp(-i*om)).*(1-conj(pol2).*exp(-i*om)));

for i= 1:1000,
    if abs(H(i))==max(abs(H))
        dolnykoniec=i;
    end
    if abs(H(i))==min(abs(H))
        hornykoniec=i;
    end
end

pp=1000-dolnykoniec+(dolnykoniec-hornykoniec)/2;
figure;
plot(om,abs(H));
axis([0 2*pi 0 max(abs(H))]);
title(pp);


