Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
put values from -6 to 6 in n and change value of k according to n. x[-6]=4 ,x[-5]=2,and change values by simply puting values in question.I've been trying to solve the question but am not getting the desired answer.
I tried separating the components and solving but still no luck. Plese help.
View attachment 171730
This is my guess attempt:put values from -6 to 6 in n and change value of k according to n. x[-6]=4 ,x[-5]=2,and change values by simply puting values in question.
clc;clear;
for n = 0:12
sum = 0;
for k = -6:5
if n < 3*k
u1 = 0;
else
u1 = 1;
end
if n < 4+3*k
u2 = 0;
else
u2 = 1;
end
sum = sum + (u1 - u2);
end
y(n+1) = 2*sum;
end
x = -6:6;
stem(x,y)