Solving difference equation using DFT

조회 수: 7 (최근 30일)
Vishwajith K
Vishwajith K 2020년 4월 22일
답변: Priyanshu Mishra 2020년 5월 2일
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?

답변 (1개)

Priyanshu Mishra
Priyanshu Mishra 2020년 5월 2일
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);

카테고리

Help CenterFile Exchange에서 Array and Matrix Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by