Question

2. Let x[n] =cos((pi*n)/8) for -16 <= n <= 16 . On the same stem diagram,...

2. Let x[n] =cos((pi*n)/8) for -16 <= n <= 16 . On the same stem diagram, plot x(n) and x(n- 4). You should use the sigshift function to complete this exercise.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

%matlab code


n=-16:16;
x=cos(pi*n/8);
x1=sigshift(x,4);
stem(x)
hold on
stem(x1,'-r')


function [y]=sigshift(x,m)
l=length(x);
y=x;
for i=1:l
if i<=m
y(i)=0;
else
y(i-m)=x(i);
end
end
end

о x(n) x(n-4 0.5 -0.5 10 15 20 25 30 35

Add a comment
Know the answer?
Add Answer to:
2. Let x[n] =cos((pi*n)/8) for -16 <= n <= 16 . On the same stem diagram,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT