Question

Solve using MAT-LAB codes: A. Solve the following difference equations using the sequential method: ylk] +1.5y[k-1]+0.5y[k-2]
0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB Code:

close all
clear
clc

num = [1 1]; % 1*x[k] + 1*x[k-1]
den = [1 1.5 0.5]; % 1*y[k] + 1.5*y[k-1] + 0.5*y[k-2]
k = 0:1:20;
x = 0.8.^k; % x[k] and since k >= 0 , u[k] = 1
x_conds = [0 0]; % [x[-2] x[-1]]
y_conds = [0 0]; % [y[-2] y[-1]]
initconds = filtic(num, den, y_conds, x_conds); % initial conditions
y = filter(num, den, x, initconds);
plot(k,y,'-o'), title('Solution'), xlabel('k'), ylabel('y[k]')

Plot:

Solution 1G 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 2 4 6 8 10 12 14 16 18 20 k

Add a comment
Know the answer?
Add Answer to:
Solve using MAT-LAB codes: A. Solve the following difference equations using the sequential method: ylk] +1.5y[k-1]+0.5y[k-2]...
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