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);
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!