tic

s=tf('s');
z=zeros(1000,3);
for i=10:10:1000

G= (exp(-num(i,5)*s))/((2*s+1)*(s+1));
K = (num(i,46) + num(i,47)/s + num(i,48)*s);

Q=G*K;

ans = allmargin(Q);
z(i,1) = ans.GainMargin(1,1);
z(i,2) = ans.PhaseMargin;
z(i,3) = ans.DelayMargin;

end

toc



