Skip to main content
added 11 characters in body
Source Link
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 yourselfmanually. Also, the condition ϕ[0] == 0 in your RSolve is redundantseems to be unnecessary.

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 yourself. Also, the condition ϕ[0] == 0 in your RSolve is redundant.

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.

Source Link
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 yourself. Also, the condition ϕ[0] == 0 in your RSolve is redundant.