MATLAB Answers

Can I control filter command?

4 views (last 30 days)
Assuming I have a function an equation like
y[n]=x[n]-y[n-1] with the condition that y[n]=0 if n<0
can I implement and solve this using filter command? or should I solve it in another way?


Sign in to comment.

Accepted Answer

per isakson
per isakson on 30 May 2020
Edited: per isakson on 30 May 2020
Yes, filter() is possible. Try
y = filter( 1, [1,1], x );

  1 Comment

Mohamed Salah
Mohamed Salah on 30 May 2020
I was trying the same line of code but with vaiables a,b and it didn't produce the correct values, but somehow the line did solve the problem. Thanks!

Sign in to comment.

More Answers (0)


Translated by