clf;

h = [1 2 1 -1];
fh = -1;
lh = fh + length(h) - 1;

x = [1 2 3 1];
fx = 0;
lx = fx + length(x) - 1;

y = conv(h,x);

n = (fh+fx):(lh+lx);

stem(n,y)
hold on
grid 
axis([-2 6 -3 9])
plot([-2 6],[0 0]);

ti=title('Example 2.3.2');
set(ti,'FontSize',18);

xl=xlabel('n (sample)');
set(xl,'FontSize',14);
set(xl,'FontWeight','bold');

tt=text(5.6,-4.3,'8/28/00');
set(tt,'FontSize',8);
set(tt,'FontName','Courier');

print -dps ex_2_3_2.ps
