Answered step by step
Verified Expert Solution
Question
1 Approved Answer
% Program P2_1 % Simulation of an M-point Moving Average Filter % Generate the input signal n = 0:100 si cos (2+pi#0.05*n); % A low
% Program P2_1 % Simulation of an M-point Moving Average Filter % Generate the input signal n = 0:100 si cos (2+pi#0.05*n); % A low frequency sinusoid s2 cos (2*pi#0.47sn); % A high frequency sinusoid x = s1+s2 ; % Implementation of the moving average filter M input ("Desired length of the filter-'); num - ones (1,M); y - filter (num,1,x)/M; % Display the input and output signals clf subplot (2,2,1); plot(n,s1); axis([O, 100, -2, 2]); xlabel ('Time index n'); ylabel('Amplitude); title( 'Signal # 1'); subplot (2,2,2); plot (n, s2) axis([0, 100, -2, 2]); xlabel ('Time index n'); ylabel('Amplitude') title ('Signal # 2'); subplot (2,2,3); plot(n,x); axis ([0, 100, -2, 2]); xlabel ('Time index n'); ylabel('Amplitude'); title('Input Signal'); subplot (2,2,4) plot(n,y); axis ([O, 100, -2, 2]); xlabel ('Time index n'); ylabel ('Amplitude') title('Output Signal'); axis; Q2.2 If the LTI system is changed from y[n] 0.5(x[n] +x[n ]) to y [n]- o. 5 (x [n] -x [n- 1] ) , what would be its effect on the input x [n] = s1 [n] + s2 [n]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started