Solving difference equation using DFT
5 views (last 30 days)
Show older comments
How to find output of a difference equation when input is given (and DFT must be used to solve it)?
Say y (n) = x (n) + 2 x (n –1) –4 y (n –1) + y (n –2)
and x (n) = [1, 2, 3, 4, 4, 3, 2, 1]
any MATLAB code reference?
0 Comments
Answers (1)
Priyanshu Mishra
on 2 May 2020
Hi Vishwajit,
You may use the following code for your reference to solve above difference equation
N = 8;
a = [1 4 -1];
b = [1 2];
x = [1 2 3 4 4 3 2 1]
y = filter(b, a, x)
stem(0:N-1,y);
0 Comments
See Also
Categories
Find more on Array and Matrix Mathematics in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!