Can I control filter command?

1 vue (au cours des 30 derniers jours)
Mohamed Salah
Mohamed Salah le 30 Mai 2020
Commenté : Mohamed Salah le 30 Mai 2020
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?

Réponse acceptée

per isakson
per isakson le 30 Mai 2020
Modifié(e) : per isakson le 30 Mai 2020
Yes, filter() is possible. Try
y = filter( 1, [1,1], x );
  1 commentaire
Mohamed Salah
Mohamed Salah le 30 Mai 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!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Mathematics and Optimization dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by