% % Example 6.16 and Figure 6.27 % T=0.1 t=0:T:10; f=sin(t); h=0.5*(exp(-t)+exp(-3*t)); % calculation of the approximate response yzsappr=T*conv(f,h); % calculations of the exact response yzs=0.25*(exp(-t)+0.2*exp(-3*t))+0.4*sin(t)-0.3*cos(t); plot(t,yzs,t,yzsappr(1:length(t)),'--') xlabel('Time in seconds') ylabel('Zero-state response and its approximation') print -deps fig6_27.eps