% Problem 4.25
disp('Problem 4.25 - gain and phase margins')

% 4.25(a)
num1=5;
den1=[1 2 0];
[Gma,Pma,Wcga,Wcpa] = margin(num1,den1)

% 4.24(b)
num2=10;
den2=conv([1 5 0],[1 10]);
[Gmb,Pmb,Wcgb,Wcpb] = margin(num2,den2)

% 4.24(c)
num3=3;
den3=conv([1 1],[1 2]);
[Gmc,Pmc,Wcgc,Wcpc] = margin(num3,den3)

% 4.24(d)
num4=[1 0 1];
den4=[1 1 0];
[Gmd,Pmd,Wcgd,Wcpd] = margin(num4,den4)


