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?

 Respuesta aceptada

per isakson
per isakson el 30 de Mayo de 2020
Editada: per isakson el 30 de Mayo de 2020

0 votos

Yes, filter() is possible. Try
y = filter( 1, [1,1], x );

1 comentario

Mohamed Salah
Mohamed Salah el 30 de Mayo de 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!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Mathematics en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 30 de Mayo de 2020

Comentada:

el 30 de Mayo de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by