Can I control filter command?

조회 수: 1 (최근 30일)
Mohamed Salah
Mohamed Salah 2020년 5월 30일
댓글: Mohamed Salah 2020년 5월 30일
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?

채택된 답변

per isakson
per isakson 2020년 5월 30일
편집: per isakson 2020년 5월 30일
Yes, filter() is possible. Try
y = filter( 1, [1,1], x );
  댓글 수: 1
Mohamed Salah
Mohamed Salah 2020년 5월 30일
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!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by