%% zetas.m Script used to produce the Bode plots of second-order systems 
%% with different damping ratios

zeta=[0.01 [.1:.2:0.9] 1]
num=1;
w=logspace(-1,1,1000);
for k=1:length(zeta)
   den(k,:)=[1 2*zeta(k) 1];
   [mag(:,k), ph(:,k)]=bode(num,den(k,:),w);
end
figure(1)
semilogx(w,20*log10(mag),'-k')
figure(2)
semilogx(w,pi*ph/180,'-k')
