% Chapter 5: Figure 5.41
%
%    Ka=30 is currently selected.  You can select Ka=60 and re-run.
%
Ka=30;
t=[0:0.01:1];
nc=[Ka*5];dc=[1]; sysc=tf(nc,dc);
ng=[1];dg=[1 20 0]; sysg=tf(ng,dg);
sys=feedback(sysg,sysc);
sys=-sys;
y=step(sys,t); plot(t,y)
xlabel('Time (s)'), ylabel('y(t)'), grid