%Tan Nguyen, Trang Pham, Nhan Phan
%ECE 460 Lab
%WINTER 2003
%Lab #2
%Part C: 
%(a) and (b)
z=[0.15:0.05:1]';
t=[0:0.01:60]';
figure(3)
for i=1:18
    num=1;
    den=[1 2*z(i) 1];
    sys=tf(num,den);
    ys=step(sys,t);
    hold on
    plot(t,ys)
    title('Part C (a): Step response of the Normalized Second Order System');
    grid on
    [tp(i), os(i), ts(i)]=tposts(t,ys)
end
hold off
figure(4)

subplot(3,1,1);plot(z,tp)
title('Peak time'); 
grid on

subplot(3,1,2);plot(z,os)
title('Overshoot'); 
grid on

subplot(3,1,3);plot(z,ts)
title('Settling Time'); 
grid on