Question

Experiment 1 - Marking 1. Section 2.2(a) Given x[n] = (0.7)cos(0.25m) u[n] Mn] =-0.8y[n-l] + 0.2Mn-2] + 0.11n_3] + 1.2x[n] + 0.2x(n-1] [-1] = 0 I-21 0 f-3] = 1 Determine y[n] for n = 0, . . ., 9 via a MATLAB simulation of the LCCDE.

Using matlab

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

Hello,
       Please find the answer attached below. If the answer has helped you please give a thumbs up rating. Thank you and have a nice day!

The following matlab code will plot y for the complete range and print the values of y from n=0 till 9

******** Matlab Code ********

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%% output simulations

n1 = 0:9;                                    % time vector
x1 = (0.7.^n1).*cos(0.25*pi*n1);             % signal x
n = [-3 -2 -1 n1];
x = [0 0 0 x1];                                 % signal x starting from time n=-3
y1 = zeros(1,length(x1));
y = [1 0 0 y1];

for count = 4:length(y)                         % start counter from y(0)
    y(count) = -0.8*y(count-1) + 0.2*y(count-2) + 0.1*y(count-3) + 1.2*x(count) + 0.2*x(count-1);
end

stem(n,y);
xlabel('n');
ylabel('y');
clc
y(4:end)

**** End of Code ******

Output:

1.5 0.5 -0.5 -1 -4 -2 2 4 6 10

vlues of y(0) till y(9) : 1.3000   -0.2460    0.5558   -0.6549    0.2739   -0.4851    0.3536   -0.2826    0.3291   -0.2387

Add a comment
Know the answer?
Add Answer to:
Using matlab Experiment 1 - Marking 1. Section 2.2(a) Given x[n] = (0.7)"cos(0.25m) u[n] Mn] =-0.8y[n-l]...
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