Skip to main content
2 of 2
added 11 characters in body
JungHwan Min
  • 4.7k
  • 1
  • 23
  • 36
y[n_] := Evaluate[(y[n] /. 
     RSolve[{y[n + 2] - y[n + 1] + 0.99*y[n] == ϕ[n], {y[0] == 0,
         y[1] == 1}}, y[n], n])[[1]]];

RSolve does not automatically Set the definition of y, so you need to assign it manually. Also, the condition ϕ[0] == 0 in your RSolve seems to be unnecessary.

JungHwan Min
  • 4.7k
  • 1
  • 23
  • 36