I need to solve an equation that looks rougly like: $$ y(t) = y(t-1) + y(t-2) + u(t) $$ I have $u(t)$ and programming this solution is quite straightforward i.e.:
for t,i in enumerate(u):
y[t] = y[t-1] + y[t-2] + u[t]
Should do the job, my problem is just the first two data points, what is the 'correct' way to input those, I was thinking to use y(1) = u(1) and y(2) = y(1)+ u(2) and take it from there, but am not sure if this is 'allowed'.
Thanks!