%This is a file to produce the unit-step response of Example 3.12

%  written by S. H. Zak on Nov 30, 2000

tspan=[0 10];
x0=[0 0 0]';
[t,x]=ode23('compesti',tspan,x0);
y=0.02*x(:,2);
plot(t,y)
set(gca,'Fontsize',12)
xlabel('Time (sec)','Fontsize',12)
ylabel('{\it y}({\it t})','Fontsize',12)
title('Step response of the closed-loop DC motor system in Example 3.12.','Fontsize',12)
grid
