Hi everyone, i have a problem :
[Σ(m=0 to m=10)] (m+1)[δ(n-2m) - δ(n-2m-1)] (0<=n<=25)
and after i google, i find the solution, and here is my link (http://www.mathworks.com/matlabcent...le-proakis-chapter-2-solutions/content/P201.m) :
n = [0:25];
x1 = zeros(1,26);
for m=0:10,
x1 = x1 + (m-1).*(impseq(2.*m,0,25)-impseq(2.*m+1,0,25));
end
subplot(3,2,1);
stem(n,x1);
title('Sequence in Problem 2.1a')
i understand the solution except for the second line and 4th line
why do they need to assign x1 = zero(1,26) and after that, they add x1 like you see in 4th line and they change to (m-1) instead of (m+1) in the problem
Can anyone explain clearly for me, i've just started learning matlab for 2 months. Thanks in advance
[Σ(m=0 to m=10)] (m+1)[δ(n-2m) - δ(n-2m-1)] (0<=n<=25)
and after i google, i find the solution, and here is my link (http://www.mathworks.com/matlabcent...le-proakis-chapter-2-solutions/content/P201.m) :
n = [0:25];
x1 = zeros(1,26);
for m=0:10,
x1 = x1 + (m-1).*(impseq(2.*m,0,25)-impseq(2.*m+1,0,25));
end
subplot(3,2,1);
stem(n,x1);
title('Sequence in Problem 2.1a')
i understand the solution except for the second line and 4th line
why do they need to assign x1 = zero(1,26) and after that, they add x1 like you see in 4th line and they change to (m-1) instead of (m+1) in the problem
Can anyone explain clearly for me, i've just started learning matlab for 2 months. Thanks in advance