% Problem 3.15

disp('Problem 3.15')
disp(' ')

% The system impulse response
y1=[]; y2=[]; t=[];
for i=0:0.1:10,
   if i<1
      h1=0;
   else
      h1=2*exp(-(i-1));
   end
   y1=[y1 h1];
   if i<2
      h2=0;
   else
      h2=3*(1-exp(-(i-2)));
   end
   y2=[y2 h2];
   t=[t i];
end
plot(t,y1,':',t,y2,':',t,y1+y2,'-')
%grid
xlabel('time [secs]')
ylabel('output y')

