w = logspace(-4,1);
s = j*w;

Gp = exp(-s);
%Gc = 1./s;
Gc = 10*(10*s+1)./(1000*s+1);

L = Gp.*Gc;
mag = abs(L);
ph = 180/pi*unwrap(angle(L));

subplot(211);
loglog(w,mag);
ylim([1e-1 1e1]);

subplot(212);
semilogx(w,ph);


for k = 1:length(w)
    if (mag(k)<1)
        break;
    end
end

pm=180+ph(k)