Thus, as in (b) g[0] = C1 + C2 + D, g[1] = 2 C1 + 3 C2 + D, and g[2] = 4 C1 + 9 C2 + D.
Also,
and
This gives C1 = -4, C2 = 3, and D = 1, so
n = 0:20; h = -2 * 2.^n + 2 * 3.^n; subplot(211) stem(n,h) g = -4 * 2.^n + 3 * 3.^n + (n>=0); subplot(212) stem(n,g)
For n<0, u[n-k] = 0 for all k (since k only goes from 0 to 9), so y[n] = 0 for n<0
For
,
u[n-k] = 1 for k up to n in the sum, so
For n>9,
u[n-k] = 1 for all k in the sum (since k only goes up to 9), so
Here is a MATLAB program to plot the output:
n=-5:50; y=zeros(size(n)); ii=find((n>=0)&(n<=9)); y(ii)=10*(1-0.9.^n(ii)); ii=find(n>9); y(ii)=10*0.9.^(n(ii)-9)*(1-0.9^10); stem(n,y)