%Figure 2.1
num=5;den=[10 1];w=0.2;delay=2;  %G(s)=exp(-delay*s)*num/den
[mag,pha]=fbode(num,den,w);
pha=pha*pi/180-delay*w;          %Phase in [rad]
t=0:.5:100;um=1;up=0;
u=um*sin(w*t+up);                %Input
ym=um*mag;yp=up+pha;
y=ym*sin(w*t+yp);                %Output
clf
axis([0 100 -3 3])
hold
plot(t,u,t,y,t,t-t,':');
xlabel('TIME [s]');
text(30,1,'u(t)'); text(37,2,'y(t)');
