- #1
- 199
- 0
Homework Statement
evaluate and plot this convolution:
y[n] = 2^n u[n+4] * u[n-3]
Homework Equations
The Attempt at a Solution
This is my code:
n0 = 20;
n = -n0:n0;
u1 = (n+4)>=0;
f1 = 2.^n;
x = f1 .*u1;
h = (n-3)>0;
y = conv (x,h);
l = length(x)+length(h)-1;
k2 = linspace(-n0,n0, l);
stem (k2, y);
xlabel ('n');
ylabel ('impulse response');
title ('System unit impulse resopnse Q1');
I get a plot, but I get suspicious about it because it doesnt seem to converge, so i change n0 (just to see) and make it 100, it still looks the same. I make it 1000, 0,-10, it still looks the same which tells me there is something wrong in my code. Awaiting your help.