L=4; M=6;
b=2;
x=b.^[0:L-1];
a=0.5;
h=a.^[0:M-1];
H=convmtx(h,L);
y1=conv(x,h);
y2=x*H;
N=L+M-1;
n=[0:(N-1)];
eps=0.02;
stem(n,y1+eps,'Linewidth',3)
hold on
stem(n,y2,'r','Linewidth',3)
c1=b/(b-a); c2=a/(a-b);
n=0:(N-1);
n=n+0.0001;
y3=c1*b.^n+c2*a.^n;
y3=y3-b^L*((c1*b.^[n-L]+c2*a.^[n-L]).*unitstep(n-L));
y3=y3-a^M*((c1*b.^[n-M]+c2*a.^[n-M]).*unitstep(n-M));
stem(n,y3-eps,'m','Linewidth',3)
hold off