clf
clear all
set(0,'defaultaxesfontsize',18);
Ne=30;
n=0:Ne;
a=-0.75, b=5/8;
%
c1=a/(a-b); c2=b/(b-a);
y=c1*a.^n + c2*b.^n;
yc=conv(a.^n,b.^n);
norm(yc(1:Ne+1)-y)
%
%plot(t,x,'Linewidth',3)
grid
axis([0 Ne min(y) max(y)])
set(gca,'XTick',[0:2:Ne],'YTick',[min(y):0.25:max(y)])
hold on
stem([0:Ne],y,'k','Linewidth',3)
stem([0:Ne],yc(1:Ne+1),'r','Linewidth',3)
title('Convolution Example');
hold off

