Question

Realize the system which generates the output y1(n)-1/2 [x(n)+x(-n)] and y2(n)-1/2 [x(n)-x(-n)] using matlab. By generating s
0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB code is given below in bold letters.

clc;
close all;
clear all;

% define w
w = [0 pi/6 3*pi/2 1.9*pi/2];

% define n
n = 1 : 50;

% define x1 and x2 and compute y1 and y2 using for loop for
% different values of w

for k = 1:length(w)
  
% define x1 and x2
x1 = sin(w(k)*n);
x2 = cos(w(k)*n);
  
% now compute y1 and y2
y1 = 0.5*([zeros(1,length(x1)+1) x1]+[fliplr(x1) zeros(1,length(x1)+1)]);
y2 = 0.5*([zeros(1,length(x1)+1) x1]-[fliplr(x1) zeros(1,length(x1)+1)]);
  
% now plot the signals
figure;
subplot(211);

stem(-max(n):max(n),y1,'fill'); grid on;
xlabel('n');ylabel('Amplitude');title(['y1[n] for w = ',num2str(w(k))]);
  

subplot(212);
stem(-max(n):max(n),y2,'fill'); grid on;
xlabel('n');ylabel('Amplitude');title(['y2[n] for w = ',num2str(w(k))]);
end

The plots are given below

yi [n] for w = 0 0.5 -0.5ト 50 40 30 -20 -10 0 10 2030 40 50 y2[n] for w = 0 0.5 0.5 50 40 30 20 1010 20 30 0 50y1In] for w 0.5236 0.5 0.5 50 40 30 20 1010 20 30 40 50 y2[n] for w 0.5236 0.5 -0.5 50 40 30 20 10 10 20 30 0 50y1[n] for w 4.7124 0.5 0.5* 50 40 32010 0 10 20 304 50 y2[n] for w4.7124 0.5 -0.5 50 40 30 20 10 0 10 20 30 50y1In] for w 2.9845 0.5 0.5 50 40 30 20 1010 20 30 40 50 y2[n] for w 2.9845 -0.5 50 40 30 20 1010 20 30 0 50

from the above fiures it is observed that y1[n] is symmeric about y axis which means that y1[n] is an even part of the signal x1. likewise y2[n] is anti-symmeric about y axis which means that y2[n] is an odd part of the signal x1

Add a comment
Know the answer?
Add Answer to:
Realize the system which generates the output y1(n)-1/2 [x(n)+x(-n)] and y2(n)-1/2 [x(n)-x(-n)] using matlab. By generating signals xl(n)-sin(on) and x2(n)-cos(on) for various values of o-[0,/6,...
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